Commits

Raymond Hettinger  committed 1cd147d

Minor change to default lru size. Set default to a power of two.

  • Participants
  • Parent commits 90ffd6c

Comments (0)

Files changed (2)

File Doc/library/functools.rst

    .. versionadded:: 3.2
 
 
-.. decorator:: lru_cache(maxsize=100, typed=False)
+.. decorator:: lru_cache(maxsize=128, typed=False)
 
    Decorator to wrap a function with a memoizing callable that saves up to the
    *maxsize* most recent calls.  It can save time when an expensive or I/O bound

File Lib/functools.py

     def __hash__(self):
         return self.hashvalue
 
-def lru_cache(maxsize=100, typed=False):
+def lru_cache(maxsize=128, typed=False):
     """Least-recently-used cache decorator.
 
     If *maxsize* is set to None, the LRU features are disabled and the cache