i'd like to suggest adding weak attributes and weak methods to the std weakref module. weakattrs are weakly-referenced attributes. when the value they reference is no longer strongly-referenced by something else, the weakattrs "nullify" themselves. weakmethod is a method decorator, like classmethod et al, that returns "weakly bound" methods. weakmethod's im_self is a weakref.proxy to `self`, which means the mere method will not keep the entire instance alive. instead, you'll get a ReferenceError. i think these two features are quite useful, and being part of the stdlib, would provide programmers with easy-to-use solutions to object-aliveness issues. more info, examples, and suggested implementation: * http://sebulba.wikispaces.com/recipe+weakattr * http://sebulba.wikispaces.com/recipe+weakmethod -tomer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060928/7c3f1fc2/attachment.html
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4