error-values 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- error_values-0.1.4/PKG-INFO +23 -0
- error_values-0.1.4/error_values/setup.py +13 -0
- error_values-0.1.4/error_values.egg-info/PKG-INFO +23 -0
- error_values-0.1.3/PKG-INFO +0 -3
- error_values-0.1.3/error_values/setup.py +0 -9
- error_values-0.1.3/error_values.egg-info/PKG-INFO +0 -3
- {error_values-0.1.3 → error_values-0.1.4}/error_values/error_values/__init__.py +0 -0
- {error_values-0.1.3 → error_values-0.1.4}/error_values/error_values/errors.py +0 -0
- {error_values-0.1.3 → error_values-0.1.4}/error_values.egg-info/SOURCES.txt +0 -0
- {error_values-0.1.3 → error_values-0.1.4}/error_values.egg-info/dependency_links.txt +0 -0
- {error_values-0.1.3 → error_values-0.1.4}/error_values.egg-info/top_level.txt +0 -0
- {error_values-0.1.3 → error_values-0.1.4}/setup.cfg +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: error_values
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Description-Content-Type: text/markdown
|
|
5
|
+
Dynamic: description
|
|
6
|
+
Dynamic: description-content-type
|
|
7
|
+
|
|
8
|
+
### Potential errors in python
|
|
9
|
+
this package allows you to handle errors like in go and rust.
|
|
10
|
+
|
|
11
|
+
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 import error_values```.
|
|
12
|
+
|
|
13
|
+
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)```.
|
|
14
|
+
|
|
15
|
+
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
|
|
16
|
+
```
|
|
17
|
+
exsampl = Potential_Error("random string")
|
|
18
|
+
if exsample.stat() == Result.FAIL:
|
|
19
|
+
# handleing error
|
|
20
|
+
dewrapped_value = exsample.dewrap()
|
|
21
|
+
# do what you want
|
|
22
|
+
```
|
|
23
|
+
along with this, you're able accses the error directly by using the ```.error``` class variable.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from setuptools import setup,find_packages
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
this_directory = Path(__file__).parent
|
|
5
|
+
long_description = (this_directory / "README.md").read_text()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name="error_values",
|
|
9
|
+
version="0.1.4",
|
|
10
|
+
packages=find_packages(),
|
|
11
|
+
long_description=long_description,
|
|
12
|
+
long_description_content_type='text/markdown'
|
|
13
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: error_values
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Description-Content-Type: text/markdown
|
|
5
|
+
Dynamic: description
|
|
6
|
+
Dynamic: description-content-type
|
|
7
|
+
|
|
8
|
+
### Potential errors in python
|
|
9
|
+
this package allows you to handle errors like in go and rust.
|
|
10
|
+
|
|
11
|
+
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 import error_values```.
|
|
12
|
+
|
|
13
|
+
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)```.
|
|
14
|
+
|
|
15
|
+
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
|
|
16
|
+
```
|
|
17
|
+
exsampl = Potential_Error("random string")
|
|
18
|
+
if exsample.stat() == Result.FAIL:
|
|
19
|
+
# handleing error
|
|
20
|
+
dewrapped_value = exsample.dewrap()
|
|
21
|
+
# do what you want
|
|
22
|
+
```
|
|
23
|
+
along with this, you're able accses the error directly by using the ```.error``` class variable.
|
error_values-0.1.3/PKG-INFO
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|