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

Nathaniel Gray n8gray at caltech.edu.is.my.e-mail.address
Tue Mar 6 03:19:20 EST 2001


Huaiyu Zhu wrote:

> It is all nice and well to say that sep.join(list) is good for
> polymorphism, except that there are several practical annoyances:
> 
> 1. The word join can be either transitive or nontransitive:
>    sep joins list.
>    list joins with sep.
>    
>    Might sep.glue(join) be clearer?  Well, compatibility with str.join?

I actually always liked ":".joins(list), which you used above.  It's much 
harder to get backwards than "join".  Alas, history has a way of trumping 
clarity, and if the name changed from "join", to "joins" during the 
transition to string methods, just as many people would be complaining 
about the switch as now complain about sep.join(list).

-n8

-- 
_.~'^`~._.~'^`~._.~'^`~._.~'^`~._.~'^`~._
             Nathaniel Gray
   California Institute of Technology
     Computation and Neural Systems
     n8gray <at> caltech <dot> edu
_.~'^`~._.~'^`~._.~'^`~._.~'^`~._.~'^`~._




More information about the Python-list mailing list