Skip to content

Commit c3ad7d9

Browse files
committed
Having the separate dict was necessary to eliminate duplicate keywords
1 parent 4881ae6 commit c3ad7d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/functools.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ The :mod:`functools` module defines the following functions:
347347

348348
def partial(func, /, *args, **keywords):
349349
def newfunc(*more_args, **more_keywords):
350-
return func(*args, *more_args, **keywords, **more_keywords)
350+
keywords_union = {**keywords, **more_keywords}
351+
return func(*args, *more_args, **keywords_union)
351352
newfunc.func = func
352353
newfunc.args = args
353354
newfunc.keywords = keywords

0 commit comments

Comments
 (0)