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.

Source Distribution

callbacks-0.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file callbacks-0.1.tar.gz.

File metadata

  • Download URL: callbacks-0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for callbacks-0.1.tar.gz
Algorithm Hash digest
SHA256 8a6397e6783934c0bd3ad16d5e4bffc1ea0ece8f1dbfb6fc50fce554ba45128d
MD5 d3327dfd144e6044d6c88873a8ec1749
BLAKE2b-256 f660e64e301ae9e7d81f117bd4fa07e6f527aac0ada312ce2792eac809b75136

See more details on using hashes here.

Supported by

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