-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython
Description
Feature
Using Class.dict.get() will wrap special methods. I noticed this when trying to update the http module.
Example:
class TestClass:
def __new__(cls, value, phrase, description=''):
pass
RustPython
>>>>> TestClass.__dict__.get("__new__")
<function TestClass.__new__ at 0x55cee9f8f810>
CPython
>>> TestClass.__dict__.get("__new__")
<staticmethod(<function TestClass.__new__ at 0x7f6444dd4ea0>)>
Python Documentation or reference to CPython source code
https://docs.python.org/3/reference/datamodel.html#object.__new__
morealCopilot
Metadata
Metadata
Assignees
Labels
C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython