<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 details)
Built Distribution
File details
Details for the file static_vars-0.1.0.tar.gz
.
File metadata
- Download URL: static_vars-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0b8 CPython/3.8.0 Darwin/19.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d334ce903cd57b580cc988e3d48e3cf6515297f4bc13296ee86d53f77bbe9e07 |
|
MD5 | a15a61561499c43c91a5413fe3c24950 |
|
BLAKE2b-256 | 0041fcf9941170d9a2ee98ff58369230b750fea5b3af8d60a32703d93e9960ea |
File details
Details for the file static_vars-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: static_vars-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0b8 CPython/3.8.0 Darwin/19.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b131be0b15a9643009bd04501cf036d766de32150bd38cbeb8603d31f7721a |
|
MD5 | 8914172a0f629fbd3051e868062a18ee |
|
BLAKE2b-256 | 303bb2693d6b6a413657d3527f7ec7a06d4af07eb9d74701e70d6ff87277673b |