changeset 3147 | 97420a49188d |
parent 3145 | e4ea47c21480 |
child 3169 | 7492b33bdd9f |
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -26,8 +26,11 @@ class SignalInterrupt(Exception): def cachefunc(func): '''cache the result of function calls''' + # XXX doesn't handle keywords args cache = {} if func.func_code.co_argcount == 1: + # we gain a small amount of time because + # we don't need to pack/unpack the list def f(arg): if arg not in cache: cache[arg] = func(arg)