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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:08208aa4-f8ac-09ac-8f53-78edf640dfcd |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | DB04:273B39:593043:76A61D:696B42D8 |
| html-safe-nonce | a33833ebdb547f96d875dc463c57b0c2e152f7199fb716a751e95cee9e922d4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjA0OjI3M0IzOTo1OTMwNDM6NzZBNjFEOjY5NkI0MkQ4IiwidmlzaXRvcl9pZCI6Ijk2MDU3OTk3MzA3MzgxNDIzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6e556fcc59c89ab5707f82dd4992a90b8e2df0bd1f491edde7b68d460869469 |
| hovercard-subject-tag | pull_request:942349395 |
| 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/RustPython/RustPython/pull/3728/checks |
| 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 |
| 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 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width