On “3. Data model - object._slots_ — Python 3.14.3 documentation”, I read
This class variable can be assigned a string, iterable, or sequence of strings with variable names used by instances. _slots_ reserves space for the declared variables and prevents the automatic creation of
__dict__and _weakref_ for each instance.
Why is it documented as object.__slots__ while described as class.__slots__?
Object and class variables are not always the same, as is e.g., the case for __dict__:
class A:
pass
a = A()
print(A.__dict__ == a.__dict__)
This code prints False.
I hope my feedback helps to improve the documentation even further!