A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-March/052153.html below:

[Python-Dev] Rationale for sum()'s design?

[Python-Dev] Rationale for sum()'s design? [Python-Dev] Rationale for sum()'s design?Alex Martelli aleaxit at yahoo.com
Mon Mar 14 13:12:59 CET 2005
On Mar 14, 2005, at 11:20, Nick Coghlan wrote:
    ...
> Somewhat ugly, but backwards compatible:

I realize you're mostly talking semantics, not implementation, but, as 
long as we're at it, could we pretty please have back the optimization 
indicated by...:

>   # Add the elements

    if isinstance(value, basestring):
       return value + ''.join(itr)

>   for item in itr:
>     value += item
>   return value

...?  This doesn't break bw compat since currently when value's a 
string sum would raise an exception...


Alex

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4