diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2022-01-19 14:53:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 14:53:41 (GMT) |
commit | 0eae9a2a2db6cc5a72535f61bb988cc417011640 (patch) | |
tree | d44575b5deba875be0087277f4347b755a4662e0 /Doc/library/datatypes.rst | |
parent | 2792d6d18eab3efeb71e6397f88db86e610541f1 (diff) | |
download | cpython-0eae9a2a2db6cc5a72535f61bb988cc417011640.zip cpython-0eae9a2a2db6cc5a72535f61bb988cc417011640.tar.gz cpython-0eae9a2a2db6cc5a72535f61bb988cc417011640.tar.bz2 |
bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335)
The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.
See also: initial discussion of issues with this piece of documentation in
GH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280).
Also improved references in glossary and typing docs. Fixed some links.
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Diffstat (limited to 'Doc/library/datatypes.rst')
0 files changed, 0 insertions, 0 deletions