class SomeClass:
q = 42
a = SomeClass()
a.q = 3
print(a.q)
delattr(a, "q")
class SomeClass:
q = 42
a = SomeClass()
#a.q = 3
print(a.q)
delattr(a, "q")
Traceback (most recent call last):
File "<string>", line 7, in <module>
AttributeError: 'SomeClass' object has no attribute 'q'