Skip to main content

Golang-esque defer functionality

Project description

image image image travis-ci.org codecov.io image image

Defer

Add a simple golang-esque deferral system for python.

Usage

import defer


@defer.with_defer
def example_function(defer):
    print("Hello")
    defer(print, "!")
    print("World")

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.0.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

py_defer-1.0.0-py2.py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page