Thomas Wouters wrote:
> 
> 
> On 6/20/07, *Nick Coghlan* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     Strings are explicitly disallowed (because Guido doesn't want a second
>     way to spell ''.join(seq), as far as I know):
> 
> 
> More importantly, because it has positively abysmal performance, just 
> like the reduce() solution (and, in fact, many reduce solutions to 
> problems better solved otherwise :-) Like the old input(), backticks and 
> allowing the mixing of tabs and spaces, while it has uses, the ease and 
> frequency with which it is misused outweigh the utility enough that it 
> should not be in such a prominent place.

The rejected suggestion which lead to the current error message was for 
sum(seq, '') to call ''.join(seq) behind the scenes to actually do the 
string concatenation - the performance would have been identical to 
calling ''.join(seq) directly. You certainly wouldn't want to use the 
same summing algorithm as is used for mutable sequences - as you say, 
the performance would be terrible.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to