summaryrefslogtreecommitdiffstats
path: root/Doc/library/constants.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/constants.rst')
-rw-r--r--Doc/library/constants.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst
index 0d44b7b..3870874 100644
--- a/Doc/library/constants.rst
+++ b/Doc/library/constants.rst
@@ -15,19 +15,21 @@ A small number of constants live in the built-in namespace. They are:
.. data:: False
- The false value of the :class:`bool` type.
+ The false value of the :class:`bool` type. Assignments to ``False``
+ are illegal and raise a :exc:`SyntaxError`.
.. data:: True
- The true value of the :class:`bool` type.
+ The true value of the :class:`bool` type. Assignments to ``True``
+ are illegal and raise a :exc:`SyntaxError`.
.. data:: None
The sole value of :attr:`types.NoneType`. ``None`` is frequently used to
represent the absence of a value, as when default arguments are not passed to a
- function.
+ function. Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`.
.. data:: NotImplemented
@@ -42,11 +44,11 @@ A small number of constants live in the built-in namespace. They are:
The same as ``...``. Special value used mostly in conjunction with extended
slicing syntax for user-defined container data types, as in ::
- val = container[1:5, 7:10, ...]
+ .. XXX Someone who understands extended slicing should fill in here.
.. data:: __debug__
- A boolean value that is :data:`True` if Python was not started with the
- ``-O`` command line option. Its value is used indirectly by the
- :keyword:`assert` statement, but it can also be used directly in code.
+ 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.