In 19.3.0, it was possible to have a custom __setattr__ on your slots class, but in 20.1.0 the custom __setattr__ is replaced with the default one:
import attr
@attr.s(slots=True)
class A:
def __setattr__(self, key, value):
print(f"{key}: {value}")
In 19.3.0:
In 20.1.0:
>>> A().a = 3
AttributeError: 'A' object has no attribute 'a'
>>> A.__setattr__
<slot wrapper '__setattr__' of 'object' objects>
When slots=False, the same thing does not occur.
In 19.3.0, it was possible to have a custom
__setattr__on yourslotsclass, but in 20.1.0 the custom__setattr__is replaced with the default one:In 19.3.0:
In 20.1.0:
When
slots=False, the same thing does not occur.