[Python-3000] Abilities / Interfaces: why not adapt()?

Paul Moore p.f.moore at gmail.com
Tue Nov 21 15:10:47 CET 2006


On 11/21/06, tomer filiba <tomerfiliba at gmail.com> wrote:
> adaptation is much more capable ("don't complain, do something
> about it") and reflective (both the protocol and the instance can
> perform the adaptation) so you don't have to explicitly inherit
> from many base classes or interfaces.
>
> i'm very +1 on reviving adapt() and dropping all those "i want
> strongly-duck-typed interfaces in python" talks.

To some extent I agree, but I also think that generic functions are
even more flexible. (As per the previous discussion which started
covering adaptation and moved on to generic functions).

I'd like to see some clear evaluation of the pros and cons of the 3 -
interfaces, adaptation, and generic functions. My feeling is that they
are to some extent "competing" proposals, and we need agreement (or
BDFL ruling!) on which is the way forward, before we start discussing
specifics.

Paul.


More information about the Python-3000 mailing list