A small number of constants live in the built-in namespace. They are:
-
.. data:: False
The false value of the :class:`bool` type.
Special value used in conjunction with extended slicing syntax.
- .. XXX Someone who understands extended slicing should fill in here.
-
.. data:: __debug__
This constant is true if Python was not started with an :option:`-O` option.
- Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
See also the :keyword:`assert` statement.
+.. note::
+
+ The names :data:`None` and :data:`__debug__` cannot be reassigned
+ (assignments to them, even as an attribute name, raise :exc:`SyntaxError`),
+ so they can be considered "true" constants.
+
+ .. versionchanged:: 2.7
+ Assignments to ``__debug__`` as an attribute became illegal.
+
+
Constants added by the :mod:`site` module
-----------------------------------------