Golang-esque defer functionality
Project description
Defer
Add a simple golang-esque deferral system for python.
TODO
- Add deferrals for a function
- Tests
- 95% testing coverage
- Add deferrals for a class
- Add deferrals for a module
Example
In [1]: import defer
In [2]: @defer.with_defer
...: def example_function():
...: print("Hello")
...: defer.defer(print, "!")
...: print("World")
...:
In [3]: example_function()
Hello
World
!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-defer-1.3.0.tar.gz
(11.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-defer-1.3.0.tar.gz.
File metadata
- Download URL: py-defer-1.3.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f04fdd6204623f304966c38ceb28d776c52590ba6897ceb450f19562fddcae
|
|
| MD5 |
c3d615f92978ee61456e0415d0de9749
|
|
| BLAKE2b-256 |
761d4f7e828d133401d69e788b332e3abf3640a9927ef2ea5a16ddca857ae1ab
|
File details
Details for the file py_defer-1.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: py_defer-1.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a16283a1317490121bb959b9f9a09a5ce7ba0e246a3103ed130a70005db06109
|
|
| MD5 |
e015505eaa65e988b7fd2399d5cd57ab
|
|
| BLAKE2b-256 |
9596f50c3d1241af21bfe4ec3cedc1c4db1eb22ad2b6e0b75ee40ab65c70e84e
|