The docs say:
If a class defines a slot also defined in a base class, the instance variable defined by the base class slot is inaccessible (except by retrieving its descriptor directly from the base class). This renders the meaning of the program undefined. In the future, a check may be added to prevent this.
How is the undefined behavior introduced ? What would be an example ? How does the instance look like - does it have both attributes somehow ?
来源:https://stackoverflow.com/questions/41159714/defining-same-slot-in-base-and-derived-python-class