[Python-Dev] (no subject)
Antoine Pitrou
solipsis at pitrou.net
Tue Feb 10 09:30:02 CET 2015
On Mon, 09 Feb 2015 18:06:02 -0800
Ethan Furman <ethan at stoneleaf.us> wrote:
> On 02/09/2015 05:14 PM, Victor Stinner wrote:
> >
> > def partial(func, *args, **keywords):
> > def newfunc(*fargs, **fkeywords):
> > return func(*(args + fargs), **keywords, **fkeywords)
> > ...
> > return newfunc
> >
> > The new code behaves differently since Neil said that an error is
> > raised if fkeywords and keywords have keys in common. By the way, this
> > must be written in the PEP.
>
>
> That line should read
>
> return func(*(args + fargs), **{**keywords, **fkeywords})
>
> to avoid the duplicate key error and keep the original functionality.
While losing readability. What's the point exactly?
One line over 112055 (as shown by Victor) can be collapsed away?
Wow, that's sure gonna change Python programming in a massively
beneficial way...
Regards
Antoine.
More information about the Python-Dev
mailing list