The difference is that instances of custom classes have a dictionary of attributes associated with them by default. You can access this dictionary with vars(my_obj)or my_obj.__dict__. You can prevent the creation of an attribute dictionary by specifying __slots__:
class MyClass(object):
__slots__ = []
, . , , .