[Python-Dev] Re: [Python-Dev] Re: String methods... finally

Greg Stein gstein at lyra.org
Tue Jun 15 12:01:09 CEST 1999

Fredrik Lundh wrote:
> if (1) is a reasonable solution (I think it is), I think the
> answer to (2) should be no, based on the rule of least
> surprise.  Python has always required me to explicitly
> state when I want to convert things in a way that may
> radically change their meaning.  I see little reason to
> abandon that in 1.6.

Especially because it is such a simple translation:



  sep.join(map(str, sequence))

Very obvious what is happening. It isn't hard to read, and it doesn't
take a lot out of a person to insert that extra phrase.

And hey... people can always do:

  def strjoin(sep, seq):
    return sep.join(map(str, seq))

And just use strjoin() everywhere if they hate the typing.


Greg Stein, http://www.lyra.org/

More information about the Python-Dev mailing list