[Python-Dev] sum(...) limitation (original) (raw)
R. David Murray rdmurray at bitdance.com
Sun Aug 10 22:27:25 CEST 2014
- Previous message: [Python-Dev] sum(...) limitation
- Next message: [Python-Dev] sum(...) limitation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 10 Aug 2014 13:12:26 -0700, Glenn Linderman <v+python at g.nevcal.com> wrote:
On 8/10/2014 1:24 AM, Stephen J. Turnbull wrote: > Actually ... if I were a fan of the "".join() idiom, I'd seriously > propose 0.sum(numericiterable) as the RightThang{tm]. Then we could > deprecate "".join(stringiterable) in favor of "".sum(stringiterable) > (with the same efficient semantics). Actually, there is no need to wait for 0.sum() to propose "".sum... but it is only a spelling change, so no real benefit.
Thinking about this more, maybe it should be a class function, so that it wouldn't require an instance: str.sum( iterablecontainingstrings ) [ or str.join( iterablecontainingstrings ) ]
That's how it used to be spelled in python2.
--David
- Previous message: [Python-Dev] sum(...) limitation
- Next message: [Python-Dev] sum(...) limitation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]