bpo-36144: Document PEP 584 (GH-18659) · python/cpython@d0ca9bd

Original file line numberDiff line numberDiff line change

@@ -4392,6 +4392,22 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:

43924392

>>> d.values() == d.values()

43934393

False

43944394
4395+

.. describe:: d | other

4396+
4397+

Create a new dictionary with the merged keys and values of *d* and

4398+

*other*, which must both be dictionaries. The values of *other* take

4399+

priority when *d* and *other* share keys.

4400+
4401+

.. versionadded:: 3.9

4402+
4403+

.. describe:: d |= other

4404+
4405+

Update the dictionary *d* with keys and values from *other*, which may be

4406+

either a :term:`mapping` or an :term:`iterable` of key/value pairs. The

4407+

values of *other* take priority when *d* and *other* share keys.

4408+
4409+

.. versionadded:: 3.9

4410+
43954411

Dictionaries compare equal if and only if they have the same ``(key,

43964412

value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise

43974413

:exc:`TypeError`.