1
0
Fork 0
This commit is contained in:
pukkandan 2022-05-20 20:55:21 +05:30
commit 1a8cc83735
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
2 changed files with 6 additions and 4 deletions

View file

@ -20,5 +20,7 @@ except NameError:
self.func = func
def __get__(self, instance, _):
if instance is None:
return self
setattr(instance, self.func.__name__, self.func(instance))
return getattr(instance, self.func.__name__)