Title: Immortal objects and the C API docs · Issue #104597 · python/cpython · GitHub
Open Graph Title: Immortal objects and the C API docs · Issue #104597 · python/cpython
X Title: Immortal objects and the C API docs · Issue #104597 · python/cpython
Description: https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None "needs to be treated just like any other object with respect to reference counts". That's not really true now that we have PEP-683 immortal objects: there...
Open Graph Description: https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None "needs to be treated just like any other object with respect to reference counts". That's not really true now that...
X Description: https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None "needs to be treated just like any other object with respect to reference counts". That's not really...
Opengraph URL: https://github.com/python/cpython/issues/104597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Immortal objects and the C API docs","articleBody":"https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None \"needs to be treated just like any other object with respect to reference counts\". That's not really true now that we have PEP-683 immortal objects: there is no need to incref/decref it. There are several similar places, e.g. https://docs.python.org/3.12/c-api/slice.html#ellipsis-object and https://docs.python.org/3.12/c-api/bool.html#c.Py_False.\r\n\r\nThe docs should be updated to somehow refer to the fact that these objects are immortal. However, extension authors who want to retain support for 3.11 and lower should continue to refcount None etc. correctly, so we shouldn't completely omit discussion of refcounting.\r\n\r\ncc @eduardo-elizondo ","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-05-18T01:53:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/104597/cpython/issues/104597"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7a15dde0-f413-22b6-07f3-bc3e6d48b4eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9260:1A500C:BC0F4D:F52CF6:696AFB93 |
| html-safe-nonce | 004244ca6de7be151b8251753121f5d24623a67d53a28994ac77d7b87ebac7ae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjYwOjFBNTAwQzpCQzBGNEQ6RjUyQ0Y2OjY5NkFGQjkzIiwidmlzaXRvcl9pZCI6Ijc5NTI2NjExODQ3NzI3NjY2MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 10d70588195e44a81644e16ed1b0f122008f180a32e8597a78e3b5adb6ba7c84 |
| hovercard-subject-tag | issue:1714865024 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/104597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29cbb898e73ef0945ed8b437f51301a2129c09bd0650adc8cebc7d24429de8e6/python/cpython/issues/104597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29cbb898e73ef0945ed8b437f51301a2129c09bd0650adc8cebc7d24429de8e6/python/cpython/issues/104597 |
| og:image:alt | https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None "needs to be treated just like any other object with respect to reference counts". That's not really true now that... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width