Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
Adapted from: http://code.activestate.com/recipes/325205-cache-decorator-in-python-24/
(released under PSF license).

The latest version of Python introduced a new language feature, function and method decorators
(PEP 318, http://www.python.org/peps/pep-0318.html). This recipe show a common callable transformation
that can benefit from the new syntax, often referred to as Memoization pattern.

Memoization is a useful pattern for improving the amortized performance of a computationally expensive
function or method. The new syntax allows making explicit that a callable is memoized.