Delightful Python decorators for daily use
Project description
common-decorators
Delightful Python decorators for daily use
Install
$ pip install common-decorators
Usage
from common_decorators import (
lazy
)
@lazy
Defines a getter property and will assign the attribute as a normal value after the first get
class Foo:
@lazy
def bar(self):
return theVeryHeavyCalculation()
foo = Foo()
print(foo.bar)
License
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
Built Distribution
Close
Hashes for common_decorators-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c922ddf52f3d1fb25c372459a5b8f1e33a45bbec9e38992db3b98c0268bb15 |
|
MD5 | 83ccc11687da702221fd0bb2df8283f3 |
|
BLAKE2b-256 | 347cd597e2f9bc69cd69002b9ce668da3be81f36cf4162d4055c918296b5cd2b |