<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.1.0.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for static_vars-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b131be0b15a9643009bd04501cf036d766de32150bd38cbeb8603d31f7721a |
|
MD5 | 8914172a0f629fbd3051e868062a18ee |
|
BLAKE2b-256 | 303bb2693d6b6a413657d3527f7ec7a06d4af07eb9d74701e70d6ff87277673b |