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.1.2.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for py_defer-1.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57bbf3de2bfefc241e098da7c8622e2c1c2c96bd2018a8cd697c1fc3947c796 |
|
MD5 | d39f245e94da9bedee72b89b9498ef40 |
|
BLAKE2b-256 | 9531400b858b8e57a8f3e1d73b832d00f237fda19e87c8c481be9454d1761992 |