Greg Ewing wrote: > > "M.-A. Lemburg" <mal@lemburg.com>: > > > I think it has to do with terminology: when I say "inherit" > > I actually mean "the lookup is forwarded to the another object". > > Some OO languages munge together the instance and inheritance > relationships, but Python isn't one of them. Using terminology > that way in the context of Python is guaranteed to cause > massive confusion! But that's exactly what I am trying to do here: separate the notion of how lookups work (inheritance) from how objects are created (instantiation) ! In Python instantiation binds the new object to the creating class and all failing lookups are directed from the object to the class. OTOH, the class - base-class lookup relationship doesn't have anything to do creation of objects -- classes are simply bound to their base-classes per definition of the class in the sense that failing lookups are directed to the base-classes. Classes themselves are created by meta-classes. The lookup strategy between the two is defined by the meta-class. What I'm argueing for is that meta-classes should get complete control over how lookups and object creation are done. However, this will only be possible by breaking the current automatic lookup scheme at the meta-class - class boundary since otherwise you'd run into endless loops during lookups (e.g. for many of the __xxx__ methods). -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
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