Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] [doc] bpo-45680: Disambiguate __getitem__ and __class_getitem__ in the data model (GH-29389) #29620

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 18, 2021

The documentation explaining Python's data model does not adequately explain
the differences between __getitem__ and __class_getitem__, nor does it
explain when each is called. There is an attempt at explaining
__class_getitem__ in the documentation for GenericAlias objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
__class_getitem__ should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
(cherry picked from commit 31b3a70)

Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com

https://bugs.python.org/issue45680

…`` in the data model (pythonGH-29389)

The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from pythonGH-29335.
(cherry picked from commit 31b3a70)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@miss-islington
Copy link
Contributor Author

@AlexWaygood and @ambv: Status check is done, and it's a failure ❌ .

@miss-islington
Copy link
Contributor Author

@AlexWaygood and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@AlexWaygood and @ambv: Status check is done, and it's a success ❌ .

@ambv ambv merged commit fde9f61 into python:3.10 Nov 18, 2021
@miss-islington miss-islington deleted the backport-31b3a70-3.10 branch November 18, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants