[Python-3000] Adaptation [was:Re: Iterators for dict keys, values, and items == annoying :)]

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 1 08:37:51 CEST 2006


Alex Martelli wrote:
> Rather, look (e.g.) at copy_reg  for the typical 
> kludge that's used to reimplement that crucial design  pattern that is 
> adaptation, over and over and over again.

I don't see what copy_reg has to do with adaptation.
What does it adapt, and to what?

You seem to be talking about adaptation as if it
were a general way of mapping a class to anything
else at all. We already have one of those, it's
called a dict.

Also, design patterns don't usually have any
generic implementation, and that's okay. It's
the reason they're called *design* patterns.

> just little hope that adaptation will actually
 > make it into the  language in any 2.* release
 > (for no good reason).

The fact that many people are unconvinced by
the case made for it so far seems like a good
reason to me.

--
Greg


More information about the Python-3000 mailing list