[Python-Dev] weakref enhancements
tomerfiliba at gmail.com
Thu Sep 28 20:40:34 CEST 2006
i'd like to suggest adding weak attributes and weak methods to the std
weakattrs are weakly-referenced attributes. when the value they reference is
longer strongly-referenced by something else, the weakattrs "nullify"
weakmethod is a method decorator, like classmethod et al, that returns
bound" methods. weakmethod's im_self is a weakref.proxy to `self`, which
the mere method will not keep the entire instance alive. instead, you'll get
i think these two features are quite useful, and being part of the stdlib,
provide programmers with easy-to-use solutions to object-aliveness issues.
more info, examples, and suggested implementation:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev