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.3.tar.gz (3.6 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for callbacks-0.1.3.tar.gz
Algorithm Hash digest
SHA256 56afe69b39aea30cb8d631c85c1f4b5bc0f80673f30fbecb96779f4c4a68611f
MD5 cc189e7c14bb47611ab9dfa35fa8d0d6
BLAKE2b-256 efa24ccc50f56621baff7e27995089c20a4ee4a129dd328b1e25f1cd79602e11

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