[Python-3000] Python 3000 Status Update (Long!)

Nick Coghlan ncoghlan at gmail.com
Thu Jun 21 15:40:29 CEST 2007


Thomas Wouters wrote:
> 
> 
> On 6/20/07, *Nick Coghlan* <ncoghlan at gmail.com 
> <mailto:ncoghlan at gmail.com>> 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   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list