mercurial/pure/__init__.py
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sat, 15 Feb 2014 19:52:26 +0900
changeset 20835 0e8417131a29
parent 16438 28a90cdf0ca0
permissions -rw-r--r--
util: add the code path to "cachefunc()" for the function taking no arguments Before this patch, "util.cachefunc()" caches the value returned by the specified function into dictionary "cache", even if the specified function takes no arguments. In such case, "cache" has at most one entry, and distinction between entries in "cache" is meaningless. This patch adds the code path to "cachefunc()" for the function taking no arguments for efficiency: to store only one cached value, using list "cache" is a little faster than using dictionary "cache".