Changeset - f38c74fbbd2e
[Not reviewed]
default
0 1 0
Ronny Pfannschmidt - 11 years ago 2015-02-02 20:12:35
opensource@ronnypfannschmidt.de
utils: reorder imports in lazy.py
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/utils/lazy.py
Show inline comments
 
import threading
 

	
 

	
 
class _Missing(object):
 

	
 
    def __repr__(self):
 
        return 'no value'
 

	
 
    def __reduce__(self):
 
@@ -38,14 +41,12 @@ class LazyProperty(object):
 
        value = obj.__dict__.get(self.__name__, _missing)
 
        if value is _missing:
 
            value = self._func(obj)
 
            obj.__dict__[self.__name__] = value
 
        return value
 

	
 
import threading
 

	
 

	
 
class ThreadLocalLazyProperty(LazyProperty):
 
    """
 
    Same as above but uses thread local dict for cache storage.
 
    """
 

	
0 comments (0 inline, 0 general)