Comment on draft PEP for deprecating six builtins

Alex Martelli aleax at aleax.it
Tue Apr 30 16:38:52 EDT 2002


John Roth wrote:
        ...
> Doesn't matter. What we need is <sequence>.join(<string>)
> where the resulting string is the result of applying str() to each
> of the members of the sequence, with the <string> between
> each pair of members. In other words, .join() is a member
> function of all objects that have a sequence interface.

Yes, this is how just about every naive designer approaches the
question.

Sure makes me glad I'm using a language designed by a guy
that doesn't fall for such easy traps.

I've explained more than once on this forum why, given the fact
that for any x.y(z) Python fully polymorphizes on x but can only
polymorphize through "use via a standard protocol" on z, it would
be a *serious design error, substantially diminishing the overall
power of the language system* to architect it your way.  Google
will no doubt help you find my posts on this if you care.

It's no doubt an interesting issue, for those who care -- why is
a futile wish for this particular design error so widespread.  Oh well.


Alex




More information about the Python-list mailing list