Py2K apologies

Paul Prescod paul at prescod.net
Wed Dec 29 16:21:19 EST 1999


Paul Prescod wrote:
> 
> ....
>
> This would imply the following:
> 
> class SomeClass( someParentClass ): pass
> 
> assert SomeClass.__fallback__ == someParentClass
> assert SomeClass().__fallback__ == SomeClass.__fallback__

This last example is not right and that probably is causing a lot of the
confusion around here. I apologize profusely. I was just tossing out
ideas in the middle of the night.

It should be:

assert SomeClass().__fallback__ == SomeClass

In other words, the fallback of an INSTANCE is the class. Overall, the
idea is not fully fleshed out because as Gordon pointed out methods do
not just "fallback" so that part would have to use the mechanism
instances currently use. Even if the relationship between instances and
classes could not be implemented in this way, the relationship between
classes and base classes and between many kinds of proxies and their
targets could be.

 Paul Prescod




More information about the Python-list mailing list