You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Added undefined __new__ method to non-built-in types #2869
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__
<bound method __new__ of <class 'type'>>
>>>>> object.__new__
<bound method __new__ of <class 'object'>>
>>>>> class A:
..... ...
.....
>>>>> A.__new__
<bound method __new__ of <class '__main__.A'>>
>>>>> A.__new__ == object.__new__
False
Activity
jamestwebber commentedon Aug 13, 2021
I believe solving this would close #2732
moreal commentedon Aug 13, 2021
I agree with it.
[-]Incompatibility for `__new__` built-in method[/-][+]Added undefined `__new__` method to non-built-in types [/+]