From 8221f86513472621e4b2039bfbe1285d24f5e941 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 26 Oct 2012 19:14:16 +0300 Subject: [PATCH] #16206: Improve examples about dict construction. --- Doc/library/stdtypes.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 846f0ca72a6..bdd8c995eb5 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1979,13 +1979,13 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: replaces the value from the positional argument. To illustrate, the following examples all return a dictionary equal to - ``{"one": 1, "two": 2}``:: + ``{"one": 1, "two": 2, "three": 3}``:: - >>> a = dict(one=1, two=2) - >>> b = dict({'one': 1, 'two': 2}) - >>> c = dict(zip(('one', 'two'), (1, 2))) - >>> d = dict([['two', 2], ['one', 1]]) - >>> e = {"one": 1, "two": 2} + >>> a = dict(one=1, two=2, three=3) + >>> b = {'one': 1, 'two': 2, 'three': 3} + >>> 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 True