From: Sergey Fedoseev Date: Fri, 19 Oct 2018 21:42:07 +0000 (+0500) Subject: Use dict unpacking in functools.partial() docs (GH-9412) X-Git-Tag: v3.8.0a1~740 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b981fec8d63697e8265d016582ce84944f272d55;p=python Use dict unpacking in functools.partial() docs (GH-9412) --- diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 7d59ec9187..ec3d5a529e 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -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