According to the Python documentation, the sys
module contains a function:
import sys
sys.getrefcount(object) #-- Returns the reference count of the object.
Generally 1 higher than you might expect, because of object arg temp reference.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…