Что выведет код?
class D:
__slots__ = ['a', 'b']
d = D()
d.a = 1
f = lambda attr: getattr(d, attr, '*')
print(f('a'), f('b'), f('__dict__'))