-
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
Converting class in Python to change to another class is not currently supported in Rustpython.
Actual Result
>>>>> class A:
..... pass
.....
>>>>> class B:
..... pass
.....
>>>>> a = A()
>>>>> a.__class__ = B
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't change class of type '<class 'A'>'Expected result
>>> class A:
... pass
...
>>> class B:
... pass
...
>>> a = A()
>>> a.__class__ = B
>>> a.__class__
<class '__main__.B'>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython