Use dict unpacking in functools.partial() docs (GH-9412)

This commit is contained in:
Sergey Fedoseev 2018-10-20 02:42:07 +05:00 committed by Victor Stinner
parent 3bd0d620d6
commit b981fec8d6
1 changed files with 1 additions and 2 deletions

View File

@ -213,8 +213,7 @@ The :mod:`functools` module defines the following functions:
def partial(func, *args, **keywords):
def newfunc(*fargs, **fkeywords):
newkeywords = keywords.copy()
newkeywords.update(fkeywords)
newkeywords = {**keywords, **fkeywords}
return func(*args, *fargs, **newkeywords)
newfunc.func = func
newfunc.args = args