i'd like to suggest adding weak attributes and weak methods to the std weakref<br>module. <br><br>weakattrs are weakly-referenced attributes. when the value they reference is no <br>longer strongly-referenced by something else, the weakattrs "nullify" themselves.
<br><br>weakmethod is a method decorator, like classmethod et al, that returns "weakly<br>bound" methods. weakmethod's im_self is a weakref.proxy to `self`, which means<br>the mere method will not keep the entire instance alive. instead, you'll get a
<br>ReferenceError.<br><br>i think these two features are quite useful, and being part of the stdlib, would <br>provide programmers with easy-to-use solutions to object-aliveness issues.<br><br>more info, examples, and suggested implementation:
<br>* <a href="http://sebulba.wikispaces.com/recipe+weakattr">http://sebulba.wikispaces.com/recipe+weakattr</a><br>* <a href="http://sebulba.wikispaces.com/recipe+weakmethod">http://sebulba.wikispaces.com/recipe+weakmethod