trace(mapattrs( ){'_listinstance__attrnames''__init__''__str__'etc 'data ''data ''data ''ham''spam'trace(mapattrs(ibysource=true){['data ''data ''data ']['_listinstance__attrnames''__str__']['__dict__''__weakref__''ham']['__doc__''__init__''__module__''__qualname__''spam']trace(mapattrs(iwithobject=true){'_listinstance__attrnames''__class__''__delattr__'etc here' the bit you might run if you want to label class objects with names inherited by an instancethough you may want to filter out some built-in double-underscore names for the sake of userseyesightamap mapattrs(iwithobject=truebysource=truetrace(amap{['data ''data ''data ']['_listinstance__attrnames''__str__']['__dict__''__weakref__''ham']['__doc__''__init__''__module__''__qualname__''spam']['__class__''__delattr__'etc '__sizeof__''__subclasshook__']finallyand as both follow-up to the prior ruminations and segue to the next section herethe following shows how this scheme works for class-based slots attributes too because class' __dict__ includes both normal class attributes and individual entries for the instance attributes defined by its __slots__ listthe slots at advanced class topics