Title: Added undefined `__new__` method to non-built-in types · Issue #2869 · RustPython/RustPython · GitHub
Open Graph Title: Added undefined `__new__` method to non-built-in types · Issue #2869 · RustPython/RustPython
X Title: Added undefined `__new__` method to non-built-in types · Issue #2869 · RustPython/RustPython
Description: Feature Currently, non-built-in types (e.g. user defined class) has its __new__ method. So they are different with object.__new__ and it cause error in inspect._signature_from_callable(). RustPython-side >>>>> type.__new__ Open Graph Description: Feature Currently, non-built-in types (e.g. user defined class) has its __new__ method. So they are different with object.__new__ and it cause error in inspect._signature_from_callable(). RustPytho...
X Description: Feature Currently, non-built-in types (e.g. user defined class) has its __new__ method. So they are different with object.__new__ and it cause error in inspect._signature_from_callable(). RustPytho...
Opengraph URL: https://github.com/RustPython/RustPython/issues/2869
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Added undefined `__new__` method to non-built-in types ","articleBody":"## Feature\r\n\r\nCurrently, non-built-in types (e.g. user defined class) has its `__new__` method. So they are different with `object.__new__` and it cause error in `inspect._signature_from_callable()`.\r\n\r\n### RustPython-side\r\n\r\n```\r\n>>>>> type.__new__\r\n\u003cbound method __new__ of \u003cclass 'type'>>\r\n>>>>> object.__new__\r\n\u003cbound method __new__ of \u003cclass 'object'>>\r\n>>>>> class A:\r\n..... ...\r\n..... \r\n>>>>> A.__new__\r\n\u003cbound method __new__ of \u003cclass '__main__.A'>>\r\n>>>>> A.__new__ == object.__new__\r\nFalse\r\n```\r\n\r\n### CPython 3.8-side\r\n```python\r\n>>> type.__new__\r\n\u003cbuilt-in method __new__ of type object at 0x7fc673a1c480>\r\n>>> object.__new__\r\n\u003cbuilt-in method __new__ of type object at 0x7fc673a1c620>\r\n>>> class A:\r\n... ...\r\n... \r\n>>> A.__new__\r\n\u003cbuilt-in method __new__ of type object at 0x7fc673a1c620>\r\n>>> A.__new__ == object.__new__\r\nTrue\r\n```\r\n\r\n## Python Documentation\r\n\r\n- https://github.com/python/cpython/blob/fa919fdf2583bdfead1df00e842f24f30b2a34bf/Objects/typeobject.c#L6065-L6083\r\n- https://docs.python.org/3/reference/datamodel.html?highlight=__new__#object.__new__","author":{"url":"https://github.com/moreal","@type":"Person","name":"moreal"},"datePublished":"2021-08-12T16:57:10Z","url":"https://github.com/RustPython/RustPython/issues/2869"}
react-profiling 0 react-import-map react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 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:28890251-6be7-b314-8e38-3f38c124cfab current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 9D84:2A7C1C:1B353A4:23EB170:6B021DE1 html-safe-nonce 3900a315d7d5a3ded7492622152c5456cda75f1e1225b1fef778ac45628ed5d0 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDg0OjJBN0MxQzoxQjM1M0E0OjIzRUIxNzA6NkIwMjFERTEiLCJ2aXNpdG9yX2lkIjoiNzQzODI2MjMxMDQ5MTI2NjUyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 2f548dabda4cf32253033e8f9cb09199f3d70492d68e6b72b79daa265603e1a5 hovercard-subject-tag issue:969191418 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/RustPython/RustPython/2869/issue_layout twitter:image https://opengraph.githubassets.com/c3aff307f0981ecefb3537f5fbc965b9c4bcc45045323dc9f7b0f50f793a4d34/RustPython/RustPython/issues/2869 twitter:card summary_large_image og:image https://opengraph.githubassets.com/c3aff307f0981ecefb3537f5fbc965b9c4bcc45045323dc9f7b0f50f793a4d34/RustPython/RustPython/issues/2869 og:image:alt Feature Currently, non-built-in types (e.g. user defined class) has its __new__ method. So they are different with object.__new__ and it cause error in inspect._signature_from_callable(). RustPytho... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username moreal hostname github.com expected-hostname github.com None 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 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 disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 423dbb54c5e7bfecc838eb387c1435eb3d0e760d ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.