[Python-Dev] sum(...) limitation

Barry Warsaw barry at python.org
Sun Aug 10 16:39:10 CEST 2014


On Aug 10, 2014, at 05:24 PM, Stephen J. Turnbull wrote:

>Actually ... if I were a fan of the "".join() idiom, I'd seriously
>propose 0.sum(numeric_iterable) as the RightThang{tm].  Then we could
>deprecate "".join(string_iterable) in favor of "".sum(string_iterable)
>(with the same efficient semantics).

Ever since ''.join was added, there has been vague talk about adding a join()
built-in.  If the semantics and argument syntax can be worked out, I'd still
be in favor of that.  Probably deserves a PEP and a millithread community
bikeshed paintdown.

-Barry


More information about the Python-Dev mailing list