tags:

views:

37

answers:

2
from _weakref import (
     getweakrefcount,
     getweakrefs,
     ref,
     proxy,
     CallableProxyType,
     ProxyType,
     ReferenceType)

thanks

+1  A: 

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.

Alex Martelli
hi,alexi see the docbut i can't find the "proxy" fucntionhow can i get the mean of 'proxy'.
zjm1126
Lines 60 to 76 (at the URL I gave) define and document the `proxy` function. Ctrl-F or Apple-F on your browser opened at the URL I already gave, searching for proxy, reveals that in about 5 seconds.
Alex Martelli
+3  A: 

_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.

Ignacio Vazquez-Abrams