Title: Add `object.__sizeof__` by rng-dynamics · Pull Request #3728 · RustPython/RustPython · GitHub
Open Graph Title: Add `object.__sizeof__` by rng-dynamics · Pull Request #3728 · RustPython/RustPython
X Title: Add `object.__sizeof__` by rng-dynamics · Pull Request #3728 · RustPython/RustPython
Description: I had a look at object.__sizeof__. @moreal opened a pull request (#3421) on it last year, but it never got finished. CPython uses tp_basicsize, tp_itemsize, and ob_size in __sizeof__. The intended use of tp_basicsize and tp_itemsize can be seen, e.g., at https://docs.python.org/3/extending/newtypes_tutorial.html#defining-new-types. Since new types are implemented different in RustPython we don't need tp_itemsize (and ob_size). If merged, this should be the last point for #2898. Can you give me some feedback? Thanks!
Open Graph Description: I had a look at object.__sizeof__. @moreal opened a pull request (#3421) on it last year, but it never got finished. CPython uses tp_basicsize, tp_itemsize, and ob_size in __sizeof__. The intended ...
X Description: I had a look at object.__sizeof__. @moreal opened a pull request (#3421) on it last year, but it never got finished. CPython uses tp_basicsize, tp_itemsize, and ob_size in __sizeof__. The intended ...
Opengraph URL: https://github.com/RustPython/RustPython/pull/3728
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:895c4c9f-4d12-85c9-ffe0-698d4d3c9141 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9666:87E17:20A3C47:2B3280A:696B064B |
| html-safe-nonce | 7d236c05b944dd12ceeec9b3a50b38d03a1bdd24621ed49c7adb4458526f022f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjY2Ojg3RTE3OjIwQTNDNDc6MkIzMjgwQTo2OTZCMDY0QiIsInZpc2l0b3JfaWQiOiI0NDAzMDAwMDc0NzQ4NzU3NTc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 481c9a2da9b42ccf865336f5cadc68ddc587ad85f2c5a7c4d7d20be2dd563b60 |
| hovercard-subject-tag | pull_request:942349395 |
| 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/RustPython/RustPython/pull/3728/files |
| twitter:image | https://avatars.githubusercontent.com/u/73444470?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/73444470?s=400&v=4 |
| og:image:alt | I had a look at object.__sizeof__. @moreal opened a pull request (#3421) on it last year, but it never got finished. CPython uses tp_basicsize, tp_itemsize, and ob_size in __sizeof__. The intended ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width