There is gc.get_referrers() and sys.getrefcount(). But, It is kind of hard to see how sys.getrefcount(X) could serve the purpose of traditional reference counting. Consider:
Every object in Python has a reference count and a pointer to a type.
我们可以用 系统模块得到一个对象的当前引用计数。你可以使用 Getrefcount (object),but keep in mind that passing in the object to getrefcount() increases the reference count by 1。
import sys
name = "Steve"
# 2 references, 1 from the name variable and 1 from getrefcount
sys.getrefcount(name)