Let function decorator decorate the bound method of per instance.
Project description
decoratemethod-python
Let function decorator decorate the bound method of per instance.
Examples
lru_cache
To make per instance has they own lru cache:
from functools import lru_cache
from decoratemethod import decorate
class Foo:
@decorate(lru_cache)
def decorated_method(self, x):
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
decoratemethod-0.1.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for decoratemethod-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a60020236c520c7c2722ccd21747e60f5df24def5eb81c335e66e91e40cd2f |
|
MD5 | 11c880ae0779c0caa008cab6a1af406c |
|
BLAKE2b-256 | 8eaa225d486fec4b1d295f78d4c0f3003c51562f52f6bb14e01cfda6c8c2f157 |