skip to navigation
skip to content

memoized 0.2

General purpose efficient memoization


The common general versions of memoized decorators ([1], [2], [3]) are often good enough but they incur some overhead that can be avoided in more special cases ([4]). This package exposes a single callable, memoized, that picks an efficient memoization implementation based on the decorated function’s signature and a few user provided options. The included benchmark file gives an idea of the performance characteristics of the different possible implementations.

Additionally, memoized allows:

  • Creating signature preserving decorators (through the decorator module).
  • Passing an external object as the underlying storage (e.g. an LRU cache) instead of a dict that is used by default.

More options for customization and optimization may be added in the future.



  • Add hashable parameter.
  • Make it possible to use @memoized as equivalent of @memoized().


  • Initial release
File Type Py Version Uploaded on Size
memoized-0.2.tar.gz (md5) Source 2013-07-29 3KB
  • Downloads (All Versions):
  • 31 downloads in the last day
  • 143 downloads in the last week
  • 584 downloads in the last month