I've just uploaded PEP 231, which describes a new hook in the instance access mechanism, called __findattr__() after a similar mechanism that exists in Jython (but is not exposed at the Python layer). You can do all kinds of interesting things with __findattr__(), including implement the __of__() protocol of ExtensionClass, and thus implicit and explicit acquisitions, in pure Python. You can also do Java Bean-like interfaces and C++-like access control. The PEP contains sample implementations of all of these, although the latter isn't as clean as I'd like, due to other restrictions in Python. My hope is that __findattr__() would eliminate most, if not all, the need for ExtensionClass, at least within the Zope and ZODB contexts. I haven't tried to implement Persistent using it though. Since it's a long PEP, I won't include it here. You can read about it at this URL http://python.sourceforge.net/peps/pep-0231.html It includes a link to the patch implementing this feature on SourceForge. Enjoy, -Barry
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