Title: gh-89554: Document standard type objects in types as classes by gaborbernat · Pull Request #150676 · python/cpython · GitHub
Open Graph Title: gh-89554: Document standard type objects in types as classes by gaborbernat · Pull Request #150676 · python/cpython
X Title: gh-89554: Document standard type objects in types as classes by gaborbernat · Pull Request #150676 · python/cpython
Description: The types module exposes built-in type objects (FunctionType, LambdaType, MethodType, the descriptor type family, FrameType, CoroutineType, AsyncGeneratorType, and the newer FrameLocalsProxyType / LazyImportType). These are classes, but the documentation marks them with the .. data:: directive, so existing :class: cross-references to them resolve against a missing py:class target and fail. Affected references appear in Doc/c-api/descriptor.rst, Doc/c-api/frame.rst, Doc/c-api/gen.rst, Doc/c-api/structures.rst, Doc/library/inspect.rst, and several Doc/whatsnew/ pages. This switches those entries to .. class::, matching how UnionType, CapsuleType, CodeType, and ModuleType are already documented in the same file, and updates the few :data: references to :class: so nothing breaks in the other direction. The singleton-value types NoneType, NotImplementedType, and EllipsisType are handled in a separate PR. Refs: gh-89554 (reported in 2021; UnionType was fixed then in GH-28757, the remainder left open). Documentation-only change, so no Misc/NEWS entry (skip news). cc @AA-Turner as the Lib/types.py maintainer.
Open Graph Description: The types module exposes built-in type objects (FunctionType, LambdaType, MethodType, the descriptor type family, FrameType, CoroutineType, AsyncGeneratorType, and the newer FrameLocalsProxyType / ...
X Description: The types module exposes built-in type objects (FunctionType, LambdaType, MethodType, the descriptor type family, FrameType, CoroutineType, AsyncGeneratorType, and the newer FrameLocalsProxyType / ...
Opengraph URL: https://github.com/python/cpython/pull/150676
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d5e0c09d-b180-a1ce-edc3-0f85a5737456 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C50E:3AB200:CE5D8B:12B7907:6A562989 |
| html-safe-nonce | ba9680f998e93ce1d2cff5013f523380c4c0d015c24212b7a34b60edaddc8a06 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTBFOjNBQjIwMDpDRTVEOEI6MTJCNzkwNzo2QTU2Mjk4OSIsInZpc2l0b3JfaWQiOiI3MjI3MjMwMTQ4OTUyOTkyMTM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | acdb2e8e96f68866f5b7a2fe760656f6b30a9f7003686d1f4684506bc400c4be |
| hovercard-subject-tag | pull_request:3776952028 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/150676/files |
| twitter:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| og:image:alt | The types module exposes built-in type objects (FunctionType, LambdaType, MethodType, the descriptor type family, FrameType, CoroutineType, AsyncGeneratorType, and the newer FrameLocalsProxyType / ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d78ea552aac0685ca5f006d44f88166cbbf3bb96843f8da0c5a2c0b9908430b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 160a6fceec0fef718a0c3ac46f2d71ae9d5c0ff5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width