Memoized
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.
News
0.3
Python 3 compatibility.
0.2
Add hashable parameter.
Make it possible to use @memoized as equivalent of @memoized().
0.1
Initial release
Metadata
Release files for memoized 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| memoized-0.3.tar.gz | 3.5 kB | Without provenance | Details |
Release files / memoized-0.3.tar.gz
| Download URL | memoized-0.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cdce8bacc6941a64f9a825067602c13810cfd9b84efaaf024c400ef6e7d378d8
|
|
BLAKE2b-256 checksum How to use checksums |
7b9b91731f60e6fba2c476b69dfe80dbf748b639a9ab559656928474235d62c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for memoized 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.