summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorgy Frolov <gosha@fro.lv>2019-09-12 09:41:36 (GMT)
committerStéphane Wirtel <stephane@wirtel.be>2019-09-12 09:41:36 (GMT)
commit7544497ad322322050f3cb64ba2f4cb7f38eddee (patch)
tree9bf0203d0fc5331ac1e294cdc6e615cab4b7ff8e /Doc
parent6e1a30b15e73ebc82e6790495fd54cc8971723ec (diff)
downloadcpython-7544497ad322322050f3cb64ba2f4cb7f38eddee.zip
cpython-7544497ad322322050f3cb64ba2f4cb7f38eddee.tar.gz
cpython-7544497ad322322050f3cb64ba2f4cb7f38eddee.tar.bz2
Doc: Add example of dict() function with positional and keyword arguments (GH-15220)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index c78f4ba..426d768 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -4213,7 +4213,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
>>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3]))
>>> d = dict([('two', 2), ('one', 1), ('three', 3)])
>>> e = dict({'three': 3, 'one': 1, 'two': 2})
- >>> a == b == c == d == e
+ >>> f = dict({'one': 1, 'three': 3}, two=2)
+ >>> a == b == c == d == e == f
True
Providing keyword arguments as in the first example only works for keys that