Double down
A silly example of a python decorator.
Simply calls the decorated function twice.
Installation
Double down has been published to python package index and is available via pip:
pip install double_down
Otherwise, if you want to install it manually:
git clone git@github.com:smelnicki/double_down.git sudo python setup.py install
Usage
This is about as simple as it gets when it comes to decorators. It literally makes your function code execute twice.
For example, see below:
# example.py
from double_down import double_down
@double_down
def hello():
print "Hello, Python"
if __name__ == "__main__":
hello()
Then in your terminal:
> python example.py Hello, Python Hello, Python
Questions
This project was just a fun little foray into learning how decorators work. In all honesty, it’d be a big stretch of the imagination to justify its use in some real life application.
If you’re curious how decorators work or want to get some hands on experience, I’d strongly encourage making one of your own. There’s plenty of documentation out there to use.
Metadata
Release files for double_down 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| double_down-1.0.1.tar.gz | 2.1 kB | Without provenance | Details |
Release files / double_down-1.0.1.tar.gz
| Download URL | double_down-1.0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba04d761d380b2bfb86d5eb9abd8ad7e14acc533152b04b2bfe28598cb023cfa
|
|
BLAKE2b-256 checksum How to use checksums |
46ddeafb955a2e9ffabb4e7bbacf9948930cd881810221cb19681fa999ee1cb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for double_down 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.