Title: [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) by miss-islington · Pull Request #29620 · python/cpython · GitHub
Open Graph Title: [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) by miss-islington · Pull Request #29620 · python/cpython
X Title: [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) by miss-islington · Pull Request #29620 · python/cpython
Description: 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
Open Graph Description: 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 atte...
X Description: 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 ...
Opengraph URL: https://github.com/python/cpython/pull/29620
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:98c2adac-6a51-c710-b4ec-df64d82e992b |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 92F2:26B7B1:BD6562:104D14C:6969F3A7 |
| html-safe-nonce | 1e878c4576f0607e9bcaeafaca6a6b5034794dbeecedff9f6b0d26dbbf027c61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkYyOjI2QjdCMTpCRDY1NjI6MTA0RDE0Qzo2OTY5RjNBNyIsInZpc2l0b3JfaWQiOiI3NTUzNjYyODg5MDkyNTc2MTY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 40c9a4208b1fe6265735a78819304e5e91ea7593dd260cc31c7c47201312665b |
| hovercard-subject-tag | pull_request:783882244 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/29620/checks |
| twitter:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| og:image:alt | 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 atte... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width