diff --git a/lib/tfw/decorators/lazy_initialise.py b/lib/tfw/decorators/lazy_initialise.py index 615721b..4fdd3a3 100644 --- a/lib/tfw/decorators/lazy_initialise.py +++ b/lib/tfw/decorators/lazy_initialise.py @@ -13,7 +13,7 @@ class LazyInitialise: def __get__(self, instance, owner): if instance is None: - raise TypeError('Cannot get object property from class!') + return self # avoids potential __new__ TypeError value = self.func(instance) setattr(instance, self.func.__name__, value) return value