« Previous | Next » 

Revision 154b9580

ID154b9580925120dfd7aa2d7c91c62a350b82108e

Added by Balazs Lecz over 12 years ago

Fix slots definitions

According to http://docs.python.org/reference/datamodel.html#slots

  • The action of a slots declaration is limited to the class where it
    is defined. As a result, subclasses will have a dict unless they
    also define slots (which must only contain names of any
    /additional/ slots).
  • 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.

Signed-off-by: Balazs Lecz <>
Reviewed-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>
Signed-off-by: Iustin Pop <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences