[Python-ideas] reduce(func, seq, initial=0)

Florian Bruhin me at the-compiler.org
Fri Oct 10 14:58:39 CEST 2014


* Stefan Behnel <stefan_ml at behnel.de> [2014-10-10 13:29:51 +0200]:
> Florian Bruhin schrieb am 10.10.2014 um 13:05:
> > FWIW, I'd also really like to see keyword arguments for these
> > builtins. I always have to keep myself from doing things like
> > 
> >     "foo bar	baz".split(count=1)
> > 
> > But as said, I suspect there is *some* reason this is not possible.
> 
> You only have to use the right argument name (and Py3.4):
> 
>     >>> "abc def".split(maxsplit=1)
>     ['abc', 'def']
> 
> Stefan

Oh, thanks for the heads-up!

The name was from memory, and I guess the last time I tested this was
with 3.3.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141010/009f20ab/attachment.sig>


More information about the Python-ideas mailing list