from _weakref import (
getweakrefcount,
getweakrefs,
ref,
proxy,
CallableProxyType,
ProxyType,
ReferenceType)
thanks
from _weakref import (
getweakrefcount,
getweakrefs,
ref,
proxy,
CallableProxyType,
ProxyType,
ReferenceType)
thanks
It's not a Python-coded module, it's a C-coded Python-extension module.
You can read the extension module's C source code here.
_weakref is a C module that comes with Python. Having said that, you should never import a module starting with an underscore directly; import the Python module and let it deal with the C module as needed, in this case weakref.