Added section on passing contextual information to logging and documentation for...
[python.git] / Doc / library / constants.rst
blob7e6397824c5de5a3a602e6003f79ee7afc87fabe
2 Built-in Constants
3 ==================
5 A small number of constants live in the built-in namespace.  They are:
8 .. data:: False
10    The false value of the :class:`bool` type.
12    .. versionadded:: 2.3
15 .. data:: True
17    The true value of the :class:`bool` type.
19    .. versionadded:: 2.3
22 .. data:: None
24    The sole value of :attr:`types.NoneType`.  ``None`` is frequently used to
25    represent the absence of a value, as when default arguments are not passed to a
26    function.
28    .. versionchanged:: 2.4
29       Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`.
32 .. data:: NotImplemented
34    Special value which can be returned by the "rich comparison" special methods
35    (:meth:`__eq__`, :meth:`__lt__`, and friends), to indicate that the comparison
36    is not implemented with respect to the other type.
39 .. data:: Ellipsis
41    Special value used in conjunction with extended slicing syntax.
43    .. XXX Someone who understands extended slicing should fill in here.
46 .. data:: __debug__
48    This constant is true if Python was not started with an :option:`-O` option.
49    Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
50    See also the :keyword:`assert` statement.