开发者

i can't found '_weakref.py',where is '_weakref.py'

开发者 https://www.devze.com 2022-12-15 16:47 出处:网络
from _weakref import ( getweakrefcount, getweakrefs, 开发者_Python百科ref, proxy, CallableProxyType,
from _weakref import (
     getweakrefcount,
     getweakrefs,
 开发者_Python百科    ref,
     proxy,
     CallableProxyType,
     ProxyType,
     ReferenceType)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消