on request slots are the most data-centric of thesebut are representative of larger category such attributes require inclusive approachesspecial handlingor general avoidance-the latter of which becomes unsatisfactory as soon as any programmer uses slots in subject code reallyclass-level instance attributes like slots probably necessitate redefinition of the term instance data--as locally stored attributesthe union of all inherited attributesor some subset thereof for examplesome programs might classify slot names as attributes of classes instead of instancesthese attributes do not exist in instance namespace dictionariesafter all alternativelyas shown earlierprograms can be more inclusive by relying on dir to fetch all inherited attribute names and getattr to fetch their corresponding values for the instance--without regard to their physical location or implementation if you must support slots as instance datathis is likely the most robust way to proceedclass slotful__slots__ [' '' ''__dict__'def __init__(selfdata)self data slotful( ai ai bi ( normal attribute fetch __dict__ both __dict__ and slots storage {' ' [ for in dir(iif not startswith('__')[' '' '' ' __dict__[' ' getattr( ' ')getattr( ' '( __dict__ is only one attr source dir+getattr is broader than __dict__ applies to slotspropertiesdescrip for in ( for in dir(iif not startswith('__'))print(agetattr(ia) under this dir/getattr modelyou can still map attributes to their inheritance sourcesand filter them more selectively by source or type if neededby scanning the mro-as we did earlier in both mapattrs py and its application to slots in mapattrs-slots py as an added bonussuch tools and policies for handling slots will potentially apply automatically to properties and descriptors toothough these attributes are more explicitly computed valuesand less obviously instance-related data than slots also keep in mind that this is not just tools issue class-based instance attributes like slots also impact the traditional coding of the __setattr__ operator overloading method new-style class extensions