Skip to main content

<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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for static-vars, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size static_vars-0.1.0-py3-none-any.whl (2.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size static_vars-0.1.0.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page