Gordon McMillan wrote: > > You can? Your proposal only specified that when the class > object is being created, method names of the form > __attr_XXX__ would cause stuff to happen in the way the class > is built. You never said that accesses to things named > __YYY_XXX__ on another object would also get transformed > into something else. I would say that __attr_XXX__ causes two things to go into the __dict__: __attr_XXX___ = <unbound method....> XXX = <attribute accessor for XXX> So you can call __attr_XXX__ directly just as you can call __getattr__ directly or __init__ etc. > Deep inheritance hierarchies are unpythonic <0.001 wink>. I'm told that in Zope even shallow hiearchies that use __getattr__ cause problems. I proposed this idea about three years ago. I'm only bringing it up again now because of a problem getting the DOM to work with Zope because of Zope's use of __getattr__. I'm told this has gotten better recently but I still see it as a symptom of a problem. -- Paul Prescod - Not encumbered by corporate consensus New from Computer Associates: "Software that can 'think', sold by marketers who choose not to."
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