Skip to content

Commit 0600d30

Browse files
committed
reposition the explanation
1 parent 17dbd2b commit 0600d30

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/library/stdtypes.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4823,7 +4823,11 @@ can be used interchangeably to index the same dictionary entry.
48234823
being added is already present, the value from the keyword argument
48244824
replaces the value from the positional argument.
48254825

4826-
To illustrate, the following examples all return a dictionary equal to
4826+
Providing keyword arguments as in the first example only works for keys that
4827+
are valid Python identifiers. Otherwise, any valid keys can be used.
4828+
4829+
To illustrate dictionary creation and equality,
4830+
the following examples all return a dictionary equal to
48274831
``{"one": 1, "two": 2, "three": 3}``::
48284832

48294833
>>> a = dict(one=1, two=2, three=3)
@@ -4835,9 +4839,6 @@ can be used interchangeably to index the same dictionary entry.
48354839
>>> a == b == c == d == e == f
48364840
True
48374841

4838-
Providing keyword arguments as in the first example only works for keys that
4839-
are valid Python identifiers. Otherwise, any valid keys can be used.
4840-
48414842
Dictionaries preserve insertion order. Note that updating a key does not
48424843
affect the order. Keys added after deletion are inserted at the end. ::
48434844

0 commit comments

Comments
 (0)