Skip to the content.

Sentinel

Auto-generated documentation for dynamo_query.sentinel module.

Sentinel value than can be used as a placeholder.

SentinelValue

[find in source code]

class SentinelValue():
    def __init__(name: str = 'DEFAULT') -> None:

Sentinel value than can be used as a placeholder. Doc generation friendly.

NOT_SET = SentinelValue('NOT_SET')

def check_value(name=NOT_SET):
    if name is NOT_SET:
        return 'This is a NOT_SET value'

    return 'This is something else'

repr(NOT_SET) # 'NOT_SET'

Arguments