Py2K wishes

John Mitchell johnm at magnet.com
Tue Dec 28 17:26:21 EST 1999


On Tue, 28 Dec 1999, Paul Prescod wrote:

> When you can't find something in the current function namespace, Python
> "falls back" to the global namespace. When it can't find something
> there, it "falls back" to the __builtins__ namespace. When Python can't
> find something in an object instance it "falls back" to the object's
> class object. When it can't find something there it "falls back" to the
> class's base class. And so forth.
> 
[...]

> I'm saying that we could expose the fallback mechanism so that an
> object could be instructed to fallback to another object.
> 
>  Paul Prescod

Isnt this the same as Fulton's __of__ code developed for Zope?  That is, a
semi-automatic delegation to another instance instead of up the class
hierarchy -- aka acquisition.

This code, if it does what you want, has the advantage of being *done* and
runnable now.  Alas, I seem to remember Guido frowning on this specific
extention...


- j






More information about the Python-list mailing list