taleinat / python-stdlib-sentinels

Reference implementation of sentinels for the Python stdlib
MIT License
38 stars 5 forks source link

Sentinels

This is a reference implementation of a utility for the definition of sentinel values in Python. This also includes a draft PEP for the inclusion of this utility in the Python standard library.

Usage

from sentinels import Sentinel

NotGiven = Sentinel('NotGiven')

MEGA = Sentinel('MEGA', repr='<MEGA>', module_name='my_mod')

References