Let function decorator decorate the bound method of per instance.
Project description
decoratemethod
Let function decorator decorate the bound method for each instance.
Usage
lru_cache
To let each instance has their 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.1.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for decoratemethod-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022fa6d871cfda402e64516402fa264bc8270f60707aa61f8082730de45f0152 |
|
MD5 | c411fed639d73d986e58c723eb4980fb |
|
BLAKE2b-256 | aa476fa3d665e5c50d6589180197702e7d1ce99a90e9ed5e76f552d1e4595d63 |