Skip to content

Commit e311ff0

Browse files
committed
move dict equal explanation
1 parent bf67280 commit e311ff0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Doc/library/stdtypes.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4823,15 +4823,13 @@ 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-
<<<<<<< HEAD
48274826
Providing keyword arguments as in the first example only works for keys that
48284827
are valid Python identifiers. Otherwise, any valid keys can be used.
48294828

4830-
To illustrate dictionary creation and equality,
4829+
Dictionaries compare equal if and only if they have the same ``(key,
4830+
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
4831+
:exc:`TypeError`. To illustrate dictionary creation and equality,
48314832
the following examples all return a dictionary equal to
4832-
=======
4833-
To illustrate, the following examples all return a dictionary equal to
4834-
>>>>>>> parent of 0600d30567e (reposition the explanation)
48354833
``{"one": 1, "two": 2, "three": 3}``::
48364834

48374835
>>> a = dict(one=1, two=2, three=3)
@@ -5037,10 +5035,6 @@ can be used interchangeably to index the same dictionary entry.
50375035

50385036
.. versionadded:: 3.9
50395037

5040-
Dictionaries compare equal if and only if they have the same ``(key,
5041-
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
5042-
:exc:`TypeError`.
5043-
50445038
Dictionaries and dictionary views are reversible. ::
50455039

50465040
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}

0 commit comments

Comments
 (0)