PEP 245: Python interfaces

Alex Martelli aleaxit at yahoo.com
Fri Mar 23 18:47:01 EST 2001


"Michel Pelletier" <michel at digicool.com> wrote in message
news:mailman.985377931.22542.python-list at python.org...
    [snip]
> >    d) What is also missing from Python is
> >       an "auto-delegation".  An analysis
> >       of how this fits in or doesn't fit
> >       in would be helpful.
>
> What is that?  I've neve heard of auto-delegation.

More properly "automatic delegation" -- in Python, you
code it up in __getattr__; in my dream-version of Java
(not existing afaik) you could just declaratively state
"and all methods of interfaces X and Y which I have
not implemented just delegate to the following expression
based on my attributes", with at least interface
granularity (if not method by method).


Alex






More information about the Python-list mailing list