I come to praise .join, not to bury it...

Alex Martelli aleaxit at yahoo.com
Fri Mar 9 09:39:19 EST 2001


"Rainer Deyke" <root at rainerdeyke.com> wrote in message
news:gRup6.364652$ge4.128679630 at news2.rdc2.tx.home.com...
> "Alex Martelli" <aleaxit at yahoo.com> wrote in message
> news:9850ge013ns at news1.newsguy.com...
> > in fact, just about any test for 'IS object X of exact type
> > Y' you can find in the Python sources, unless they are
> > shortcut-like 'accelerators' for a special case _before_
> > the more-general request 'please o mr X try to behave like
> > an Y, are you able to?', can be seen as implementation
> > defects, in my personal opinion.
>
> I'm curious: how do you feel about the automagic conversions of functions
> (and only true function, not function-like objects) into unbound methods,
> and from unbound methods into bound methods?  I'm thinking that the former
> could be eliminated entirely, and the latter replaced by a __bind__ magic
> method that allows the mechanism to apply to function-like objects.

I'll admit I have not digged deep enough into this part of
the Python internal mechanisms to have any deep feelings
either for or against.  I find the _results_ pretty good,
although not perfect.  If the special-casing could in fact
be eliminated, and further polymorphism gained at no great
cost, through the modifications you're thinking of, then I
think they'd be swell.


Alex






More information about the Python-list mailing list