[Python-checkins] (no subject)
Stéphane Wirtel
webhook-mailer at python.org
Thu Sep 12 05:41:40 EDT 2019
To: python-checkins at python.org
Subject: Doc: Add example of dict() function with positional and keyword
arguments (GH-15220)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/7544497ad322322050f3cb64ba2f4cb7f38e=
ddee
commit: 7544497ad322322050f3cb64ba2f4cb7f38eddee
branch: master
author: Georgy Frolov <gosha at fro.lv>
committer: St=C3=A9phane Wirtel <stephane at wirtel.be>
date: 2019年09月12日T10:41:36+01:00
summary:
Doc: Add example of dict() function with positional and keyword arguments (GH=
-15220)
files:
M Doc/library/stdtypes.rst
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index c78f4ba8f068..426d768b170e 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -4213,7 +4213,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjo=
erd': 4127}`` or ``{4098:
>>> c =3D dict(zip(['one', 'two', 'three'], [1, 2, 3]))
>>> d =3D dict([('two', 2), ('one', 1), ('three', 3)])
>>> e =3D dict({'three': 3, 'one': 1, 'two': 2})
- >>> a =3D=3D b =3D=3D c =3D=3D d =3D=3D e
+ >>> f =3D dict({'one': 1, 'three': 3}, two=3D2)
+ >>> a =3D=3D b =3D=3D c =3D=3D d =3D=3D e =3D=3D f
True
=20
Providing keyword arguments as in the first example only works for keys t=
hat
More information about the Python-checkins
mailing list