>>>>> "FB" == Finn Bock <bckfnn@worldonline.dk> writes: FB> This way each computed attribute get controll when accessed, FB> modified and deleted. The hooks primary purpose is to support FB> JPythons use of java bean properties, fields and methods. It FB> is currently not available from within python, so it is not FB> possible to define "def _doget(..)" in a python class. FB> All this is just a datapoint. But a good one, and perhaps one to model CPython on. There are also similarities here with the Zope Acquisition model, which uses __of__ instead. So this is clearly a functionality that is very useful in some contexts. JPython's __findattr__ hook might also be useful because it allows interposition on the lookup of all names, i.e. not just missing names. In any event, we should look to JPython as an example of how it might be done, but once a formal mechanism is adopted for CPython, we'll add it to the language spec and update JPython to support the same mechanism. -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