Skip to main content

Simple callbacks using decorators

Project description

Callbacks lets you use decorator syntax to set callbacks on methods or functions.

```python
from callbacks import supports_callbacks

def callback():
print "Polly!"

@supports_callbacks
def target():
print "hello",

target.add_callback(callback)

print "This should print 'hello Polly!':"
target() # prints "hello Polly!"
```

[![Build Status](https://secure.travis-ci.org/davidlmorton/callbacks.png?branch=master)](https://travis-ci.org/davidlmorton/callbacks)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for callbacks, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size callbacks-0.1.3.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page