Skip to main content

No project description provided

Project description



Just a decorator to handle exceptions. It maps Python Exceptions to specific callbacks.


from tryit import tryit, ExceptionTarget

  ExceptionTarget(ZeroDivisionError, callback=lambda err: float("nan"))
def divide(a: int, b: int) -> float:
  return a/b

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

tryit-0.1.2.tar.gz (13.9 kB view hashes)

Uploaded source

Built Distribution

tryit-0.1.2-py3-none-any.whl (14.1 kB view hashes)

Uploaded py3

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