Somebody please help me to explain why there is no asset instant was passed in call func in python 3 and which annotation it was used in following lines of code:
class ValidateSetterProperty:
def __init__(self, func):
self.make_attr_dict()
def __call__(self, *args, **kwargs):
print (args)
def make_attr_dict(self):
self.attr_dict = dict()
class asset():
def __init__(self):
self.a = list()
self.b = dict()
self.c = list()
@ValidateSetterProperty
def __setattr__(self):
pass
asset = asset()
Output:
Python 3.x
('a', [])
('b', {})
('c', [])
Python 2.x
(<__main__.asset instance at 0x7feeef8ae950>, 'a', [])
(<__main__.asset instance at 0x7feeef8ae950>, 'b', {})
(<__main__.asset instance at 0x7feeef8ae950>, 'c', [])