This commit is contained in:
Zhenwen Dai 2014-05-08 13:08:16 +01:00
parent 06336bf0d4
commit ddbf15d763
6 changed files with 122 additions and 86 deletions

View file

@ -123,7 +123,8 @@ class Cacher_wrap(object):
def __get__(self, obj, objtype=None):
return partial(self, obj)
def __call__(self, *args, **kwargs):
obj = args[0]
obj = args[0] # <------------------- WHAT IF IT IS ONLY A FUNCTION!
#import ipdb;ipdb.set_trace()
try:
caches = obj.__cachers