Some Python 2.1 ideas

Moshe Zadka moshez at zadka.site.co.il
Mon Dec 25 16:02:50 CET 2000


On Sun, 24 Dec 2000 23:30:30 +0100, "Alex Martelli" <aleaxit at yahoo.com> wrote:

> A mixin-class (implementing, e.g., readline_chomp in terms of .readline
> and chomp, in this case) could also be supplied to ease the task of
> 'emulating convenience-methods'.  Not crucial in this case (the proposed
> methods appear somewhat marginal), but an approach that might help
> in other cases, I think.

I think in that case a function which does the "readline_chomp" is better:
you don't need to change many object's declerations, mix them in, not
to mention that it doesn't help built-in types at all. Frankly, I fail
to see why people are so afraid of functions: generic functions *enhance*
polymorphism.

-- 
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!




More information about the Python-list mailing list