4 A small number of constants live in the built-in namespace. They are:
8 The false value of the :class:`bool` type.
15 The true value of the :class:`bool` type.
22 The sole value of :attr:`types.NoneType`. ``None`` is frequently used to
23 represent the absence of a value, as when default arguments are not passed to a
26 .. versionchanged:: 2.4
27 Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`.
30 .. data:: NotImplemented
32 Special value which can be returned by the "rich comparison" special methods
33 (:meth:`__eq__`, :meth:`__lt__`, and friends), to indicate that the comparison
34 is not implemented with respect to the other type.
39 Special value used in conjunction with extended slicing syntax.
44 This constant is true if Python was not started with an :option:`-O` option.
45 See also the :keyword:`assert` statement.
50 The names :data:`None` and :data:`__debug__` cannot be reassigned
51 (assignments to them, even as an attribute name, raise :exc:`SyntaxError`),
52 so they can be considered "true" constants.
54 .. versionchanged:: 2.7
55 Assignments to ``__debug__`` as an attribute became illegal.
58 Constants added by the :mod:`site` module
59 -----------------------------------------
61 The :mod:`site` module (which is imported automatically during startup, except
62 if the :option:`-S` command-line option is given) adds several constants to the
63 built-in namespace. They are useful for the interactive interpreter shell and
64 should not be used in programs.
66 .. data:: quit([code=None])
69 Objects that when printed, print a message like "Use quit() or Ctrl-D
70 (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
77 Objects that when printed, print a message like "Type license() to see the
78 full license text", and when called, display the corresponding text in a
79 pager-like fashion (one screen at a time).