FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-83448: Fix dict's __missing__ documentation by bharel · Pull Request #17911 · python/cpython · GitHub

Repository navigation

Prev Previous commit
Merge branch 'main' into fix-dict-get-docs
  • Loading branch information
AlexWaygood authored Oct 30, 2022
commit 99cd7dc921cb8ea5e35218286d5bc4270e79e790
16 changes: 16 additions & 0 deletions Doc/library/stdtypes.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,22 @@ can be used interchangeably to index the same dictionary entry.
to implement ``self[key]`` for dict subclasses when key is not in the
dictionary. See ``d[key]`` above.

.. describe:: d | other

Create a new dictionary with the merged keys and values of *d* and
*other*, which must both be dictionaries. The values of *other* take
priority when *d* and *other* share keys.

.. versionadded:: 3.9

.. describe:: d |= other

Update the dictionary *d* with keys and values from *other*, which may be
either a :term:`mapping` or an :term:`iterable` of key/value pairs. The
values of *other* take priority when *d* and *other* share keys.

.. versionadded:: 3.9

Dictionaries compare equal if and only if they have the same ``(key,
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
:exc:`TypeError`.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.

Back | FazBrowse Home | New Git URL