[Python-3000] Automatically invoking str() in str.join()
Tim Peters
tim.peters at gmail.com
Thu Apr 27 20:54:19 CEST 2006
[Fredrik Lundh]
> no, because people enjoy writing readable code. doing things by exe-
> cuting methods attached to literals isn't very readable, and isn't used
> for anything else.
As Barry often says, he spells it TAB.join() or BLANK.join() (etc)
instead. That's very readable.
> I don't think anyone on this list can take the "but if there's more than
> one argument, *I* am going to be confused" argument seriously.
Then you don't remember that the order of arguments here _was_ a
frequent confusion in the old days. If you like a callable with
separator first, you can also do
join = str.join
today, and if you like a callable with separator second, you can also do
from string import join
today. My bet is that nobody here uses either, because they don't
really find the method spelling distasteful enough to endure the
one-line bother to set up an alternative that would flood their soul
with joy ;-)
If you want a builtin instead in Py3K, I'm just -0 on that (but -1 if
that's in _addition_ to the three spellings Python already has).
More information about the Python-3000
mailing list