In CPython, the following code can execute normally.
class Foo: pass
f = Foo()
print(f.__dict__)
del f.__dict__
But in rustpython, it triggers TypeError:
Traceback (most recent call last):
File "temp.py", line 4, in <module>
del f.__dict__
TypeError: can't delete attribute
I am not sure if it is a design or a bug.
P.S., Are there any docs to explain the consistency between CPython and rustpython, or they should be exactly the same?
In CPython, the following code can execute normally.
But in rustpython, it triggers TypeError:
I am not sure if it is a design or a bug.
P.S., Are there any docs to explain the consistency between CPython and rustpython, or they should be exactly the same?