summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2012-06-04 07:32:15 (GMT)
committerRaymond Hettinger <python@rcn.com>2012-06-04 07:32:15 (GMT)
commit7d74effc67281b505756e040437241e5b1436a7c (patch)
tree0ccd97bddebcf2b72b53ca2960a7d4219f348abc
parent0c9050c25db74108d1fa4051bca4d16d2394f826 (diff)
downloadcpython-7d74effc67281b505756e040437241e5b1436a7c.zip
cpython-7d74effc67281b505756e040437241e5b1436a7c.tar.gz
cpython-7d74effc67281b505756e040437241e5b1436a7c.tar.bz2
Add usage note.
-rw-r--r--Doc/library/functools.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index 1b0d82a..f5c6608 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -49,8 +49,9 @@ The :mod:`functools` module defines the following functions:
Since a dictionary is used to cache results, the positional and keyword
arguments to the function must be hashable.
- If *maxsize* is set to None, the LRU feature is disabled and the cache
- can grow without bound.
+ If *maxsize* is set to None, the LRU feature is disabled and the cache can
+ grow without bound. The LRU feature performs best when *maxsize* is a
+ power-of-two.
If *typed* is set to True, function arguments of different types will be
cached separately. For example, ``f(3)`` and ``f(3.0)`` will be treated