<Enter a one-sentence description of this project here.>
Project description
A decorator for adding static variables to a method.
Typical use:
from static_vars import static_vars
@static_vars(counter=0)
def foo():
foo.counter += 1
foo()
foo()
assert foo.counter==2
foo.counter = 0
foo()
assert foo.counter==1
Free software: MIT license
Documentation: https://static-vars.readthedocs.io.
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
static_vars-0.0.0.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for static_vars-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58c7868d9e1980d87c1cf329b1aa0b341175cdd17e5a90d5dc14ee46b690ca8f |
|
MD5 | 83b0a994663b11ab93059f78e952557b |
|
BLAKE2b-256 | 6e80f0096d20223ccea69f36821c5a3335bbccd30732d989f9fb6c4d169d2cbf |