No project description provided
Project description
Tryit
Description
Just a decorator to handle exceptions. It maps Python Exceptions to specific callbacks.
Usage
from tryit import tryit, ExceptionTarget
@tryit(exceptions=[
ExceptionTarget(ZeroDivisionError, callback=lambda err: float("nan"))
])
def divide(a: int, b: int) -> float:
return a/b
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
tryit-0.1.2-py3-none-any.whl
(14.1 kB
view hashes)