Pre-release
This release is a pre-release and may not be stable for production use.
No exceptions
Errors as values for Python. A more functional alternative to try-except blocks, offering less indented code and a
chainable API.
- Do you hate exceptions?
- Do you hate the extra indentation they bring?
- Do you hate the convoluted flow of control they seed?
- Do you hate APIs that throw exceptions in not-really-erroneous cases (like
ZeroDivisionError,KeyError,IndexError,StopIteration)?
Use this package to switch from this:
def some_func() -> float:
...
try:
return numerator / denominator
except ZeroDivisionError:
return 0.0
to this:
from no_exceptions import try_expecting
def some_func() -> float:
...
return try_expecting(lambda: numerator / denominator, ZeroDivisionError).unwrap_or(0.0)
Metadata
Release files for no-exceptions 0.1.0.dev2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| no_exceptions-0.1.0.dev2.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| no_exceptions-0.1.0.dev2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / no_exceptions-0.1.0.dev2.tar.gz
| Download URL | no_exceptions-0.1.0.dev2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30fc38421e5ac5a28498bec231db4a9c6ddd79ec08c4871624ec1a540b837855
|
|
BLAKE2b-256 checksum How to use checksums |
fe3d3a6a18c0cf8fbf250a2d5ee3903c1dd25fdc44e253425a6841f14b6fc523
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.19
|
Release files / no_exceptions-0.1.0.dev2-py3-none-any.whl
| Download URL | no_exceptions-0.1.0.dev2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0969fa0fcf3b1f066a4c4ef84d34e2b46d40395599d2684894d29428ef55d139
|
|
BLAKE2b-256 checksum How to use checksums |
74bd8499fb1cee17e602ddd0215afd650c3d862798dbf6792c3e6cc4c5e0aff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.19
|