sum(strings)

Aahz aahz at pythoncraft.com
Thu Jun 19 22:19:41 CEST 2003


In article <7xu1amvu8g.fsf at ruckus.brouhaha.com>,
Paul Rubin  <http://phr.cx@NOSPAM.invalid> wrote:
>Alex Martelli <aleax at aleax.it> writes:
>>
>> No, if sum accepted a sequence of strings it WOULD
>> have to delegate to ''.join in that case -- and I just couldn't
>> find an elegant and totally general way to do that. 
>
>Why can't it just check if all the values are strings, and delegate if
>they are?

Wouldn't be a problem if strings were really the only issue, but once
you start adding Unicode and other string-like objects...
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you don't know what your program is supposed to do, you'd better not
start writing it."  --Dijkstra




More information about the Python-list mailing list