mentortools/libs/: no-value-abm-1.1.80822 metadata and description
| author | mike |
| author_email | m.orlov@technokert.ru |
| classifiers |
|
| description_content_type | text/markdown |
| license | Proprietary. All rights reserved. Confidential and belonging to ABM. |
| requires_python | >=3.11,<4.0 |
| File | Tox results | History |
|---|---|---|
no_value_abm-1.1.80822-py3-none-any.whl
|
|
|
no_value_abm-1.1.80822.tar.gz
|
|
No value
Sentinel values to express missing keys or values, where None has it's own meaning, for example in jsom
warn: does not support static analysis (there is not way to make it right now)
Examples:
from no_value import NoValue
def update_some_value(val: int | None | NoValue) -> None:
if isinstance(val, int):
print(f'set something to {val}')
elif val is None:
print(f'clear value')
elif val is NoValue:
print("do nothing")
update_some_value(17)
update_some_value(42)
update_some_value(NoValue)
update_some_value(None)
Will
set something to 17
set something to 42
do nothing
clear value