diff options
Diffstat (limited to 'ranger/ext/lazy_property.py')
-rw-r--r-- | ranger/ext/lazy_property.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/ext/lazy_property.py b/ranger/ext/lazy_property.py index 4bdcda1e..2fbe0cfd 100644 --- a/ranger/ext/lazy_property.py +++ b/ranger/ext/lazy_property.py @@ -1,7 +1,9 @@ # From http://blog.pythonisito.com/2008/08/lazy-descriptors.html +from __future__ import (absolute_import, print_function) -class lazy_property(object): + +class lazy_property(object): # pylint: disable=invalid-name,too-few-public-methods """A @property-like decorator with lazy evaluation >>> class Foo: @@ -29,6 +31,7 @@ class lazy_property(object): obj.__dict__[self.__name__] = result return result + if __name__ == '__main__': import doctest doctest.testmod() |