sum and strings

Georg Brandl g.brandl-nospam at gmx.net
Sat Aug 19 18:27:44 EDT 2006


Bill Pursell wrote:
> Georg Brandl wrote:
>> Paul Rubin wrote:
>> > Sybren Stuvel <sybrenUSE at YOURthirdtower.com.imagination> writes:
>> >> Because of "there should only be one way to do it, and that way should
>> >> be obvious". There are already the str.join and unicode.join methods,
>> >
>> > Those are obvious???
>>
>> Why would you try to sum up strings? Besides, the ''.join idiom is quite
>> common in Python.
> 
> One could extend this argument to dissallow the following:
>>>> "foo" + "bar"

Fortunately, hypergeneralization is not one of Python's weaknesses.

Georg



More information about the Python-list mailing list