Guido van Rossum wrote:
I guess that leaves Alex's question of whether or not supplying a string of some
description as the initial value can be legitimately translated to:

  if isinstance(initial, basestring):
    return initial + type(initial)().join(seq)


If you're trying to get people in the habit of writing sum(x, "")
instead of "".join(x), I fear that they'll try sum(x, " ") instead of
" ".join(x), and be sadly disappointed.

That works for me as a reason not to provide this feature.

It's somewhat heartening when discussions like this turn out to show that the original design was right after all :)

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to