mentortools/libs/: no-value-abm-1.1.80822 metadata and description

Simple index

author mike
author_email m.orlov@technokert.ru
classifiers
  • License :: Other/Proprietary License
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
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
Size
2 KB
Type
Python Wheel
Python
3
no_value_abm-1.1.80822.tar.gz
Size
1 KB
Type
Source

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