Title: `_Py_RefcntAdd` doesn't respect immortality · Issue #104142 · python/cpython · GitHub
Open Graph Title: `_Py_RefcntAdd` doesn't respect immortality · Issue #104142 · python/cpython
X Title: `_Py_RefcntAdd` doesn't respect immortality · Issue #104142 · python/cpython
Description: This is used by list and tuple internally: >>> import sys >>> sys.getrefcount(None) == (1 << 32) - 1 True >>> refs = [None] * 42 >>> sys.getrefcount(None) == (1 << 32) - 1 False >>> del refs >>> sys.getrefcount(None) == (1 << 32) - 1 Tru...
Open Graph Description: This is used by list and tuple internally: >>> import sys >>> sys.getrefcount(None) == (1 << 32) - 1 True >>> refs = [None] * 42 >>> sys.getrefcount(None) == (1 << 32) - 1 False >>> del refs >>> sy...
X Description: This is used by list and tuple internally: >>> import sys >>> sys.getrefcount(None) == (1 << 32) - 1 True >>> refs = [None] * 42 >>> sys.getrefcount(None) ...
Opengraph URL: https://github.com/python/cpython/issues/104142
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_Py_RefcntAdd` doesn't respect immortality","articleBody":"This is used by `list` and `tuple` internally:\r\n\r\n```py\r\n\u003e\u003e\u003e import sys\r\n\u003e\u003e\u003e sys.getrefcount(None) == (1 \u003c\u003c 32) - 1\r\nTrue\r\n\u003e\u003e\u003e refs = [None] * 42\r\n\u003e\u003e\u003e sys.getrefcount(None) == (1 \u003c\u003c 32) - 1\r\nFalse\r\n\u003e\u003e\u003e del refs\r\n\u003e\u003e\u003e sys.getrefcount(None) == (1 \u003c\u003c 32) - 1\r\nTrue\r\n```\r\n\r\nI'll have a PR up in a bit.\r\n\r\nCC: @ericsnowcurrently, @eduardo-elizondo \n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-104143\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/brandtbucher","@type":"Person","name":"brandtbucher"},"datePublished":"2023-05-03T21:05:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/104142/cpython/issues/104142"}
| 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:8d6cf200-07e2-764d-bb3a-e46fde5161a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAC4:28DD5C:F97497:14EC7B1:69699211 |
| html-safe-nonce | 11d2200a692e3ae426be8821aaca9ea781715abd684c51aae365cc378c9af379 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUM0OjI4REQ1QzpGOTc0OTc6MTRFQzdCMTo2OTY5OTIxMSIsInZpc2l0b3JfaWQiOiI3NzcxNjI5OTI4MTUzOTc3MzYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9ae122ae3503b5e42a4798edb2483938d38196b9f172fff346ea00e800d1d09e |
| hovercard-subject-tag | issue:1694830114 |
| 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/104142/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30a08029ff314dfc24a919b5ef83712503010bac2059efb7f0c184fc1124c85d/python/cpython/issues/104142 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30a08029ff314dfc24a919b5ef83712503010bac2059efb7f0c184fc1124c85d/python/cpython/issues/104142 |
| og:image:alt | This is used by list and tuple internally: >>> import sys >>> sys.getrefcount(None) == (1 << 32) - 1 True >>> refs = [None] * 42 >>> sys.getrefcount(None) == (1 << 32) - 1 False >>> del refs >>> sy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandtbucher |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| 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 | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width