class A:
    __slots__ = 'a', 'b'

@property
def __dict__(self):
    print('inside A')
return self.__slots__


class B(A):
    pass
print(B().__dict__)
print('-' * 20)


class B(A):
    __slots__ = ()
print(B().__dict__)
Listing attributes of namedtuple subclass