xdoctest.constants module¶
Defines sentinel values for internal xdoctest usage
- class xdoctest.constants._NOT_EVAL_TYPE[source]¶
Bases:
object
This is a singleton object used as a sentinel value. The value of
NoParam
is robust to reloading, pickling, and copying. See [SO_41048643] for more details.References
Example
>>> from xdoctest.constants import NOT_EVALED, _NOT_EVAL_TYPE # NOQA >>> import copy >>> assert not NOT_EVALED >>> assert str(NOT_EVALED) == '<NOT_EVALED>' >>> assert repr(NOT_EVALED) == '<NOT_EVALED>' >>> assert NOT_EVALED(...) is None >>> assert copy.copy(NOT_EVALED) is NOT_EVALED >>> assert copy.deepcopy(NOT_EVALED) is NOT_EVALED >>> assert _NOT_EVAL_TYPE() is NOT_EVALED