No project description provided
Project description
Potential errors in python
this package allows you to handle errors like in go and rust.
Inorder to do this, you must first install the package using pip install error-values. Then you must import it into your prodjects like so import error_values or better from error_values.error_value import errors.
After that, you can use the Potential_Error class for safe results, you can do so like this Potential_Error("random string"), meanwhile for dangerous result, you can do this Potential_Error(None,Random_Error).
Inorder to get the result you must use the dwrap method like so exsample.dewrap(), only AFTER you get the stat from the stat method, and handle the errors like so
exsampl = Potential_Error("random string")
if exsample.stat() == Result.FAIL:
# handleing error
dewrapped_value = exsample.dewrap()
# do what you want
along with this, you're able accses the error directly by using the .error class variable.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file error_values-0.1.5.tar.gz.
File metadata
- Download URL: error_values-0.1.5.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a9e18f4b76d1134e3895638f70bb7d056f08342c310d0ac8b019965366401bd
|
|
| MD5 |
182961180bac7470d753507e38a3d2bd
|
|
| BLAKE2b-256 |
6f56b377d5133a6d92f89e31a954ca06ee26a6f59a02ae12586171a6d0afd6a1
|
File details
Details for the file error_values-0.1.5-py3-none-any.whl.
File metadata
- Download URL: error_values-0.1.5-py3-none-any.whl
- Upload date:
- Size: 1.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c81e98f0a81ab20fa16a5985190dd5e85358e368f99c20cbb7d029161da36f8
|
|
| MD5 |
b5674fce8bc0912eb07f147f2c4c9fa1
|
|
| BLAKE2b-256 |
08fdba62d3ea313d022b438e708dc7a3c3fac4baa338ee5ec84fd670ff125489
|