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 details)
Built Distribution
File details
Details for the file decoratemethod-0.1.1.tar.gz
.
File metadata
- Download URL: decoratemethod-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d59d16730e9376a43312fdc6ca9d9da47b22d484b9628727c8ca2fb17ef7a1d3 |
|
MD5 | 8709f99608138976c07ef5de428a83ac |
|
BLAKE2b-256 | b919a193f67fa74f9b2841636a382d429e5d959b6814b5e9530701c5f7167492 |
File details
Details for the file decoratemethod-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: decoratemethod-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022fa6d871cfda402e64516402fa264bc8270f60707aa61f8082730de45f0152 |
|
MD5 | c411fed639d73d986e58c723eb4980fb |
|
BLAKE2b-256 | aa476fa3d665e5c50d6589180197702e7d1ce99a90e9ed5e76f552d1e4595d63 |