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 hashes)
Built Distribution
Close
Hashes for py_defer-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16283a1317490121bb959b9f9a09a5ce7ba0e246a3103ed130a70005db06109 |
|
MD5 | e015505eaa65e988b7fd2399d5cd57ab |
|
BLAKE2b-256 | 9596f50c3d1241af21bfe4ec3cedc1c4db1eb22ad2b6e0b75ee40ab65c70e84e |