In article <7e905311-c561-4b93-9414-f873e6fee...@j19g2000yqk.googlegroups.com>, Mark Dickinson <dicki...@gmail.com> wrote: > >For some reason that I don't really understand, the CPython source does >the equivalent of concat2 instead of concat3. See the builtin_sum >function in > >http://svn.python.org/view/python/trunk/Python/bltinmodule.c?view=3Dmarkup > >and scroll past the special cases for ints and floats. After a >one- line source change, replacing the PyNumber_Add call with >PyNumber_InPlaceAdd,
Ahhh, I vaguely remember there being some discussion of this when sum() was introduced -- I think that using InPlaceAdd would have caused bad behavior when the initial list was referred to by multiple names. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "To me vi is Zen. To use vi is to practice zen. Every command is a koan. Profound to the user, unintelligible to the uninitiated. You discover truth everytime you use it." --re...@lion.austin.ibm.com -- http://mail.python.org/mailman/listinfo/python-list