mirror of https://github.com/python/cpython
Use dict unpacking in functools.partial() docs (GH-9412)
This commit is contained in:
parent
3bd0d620d6
commit
b981fec8d6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue