summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-02 19:36:36 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-02 19:36:36 (GMT)
commitc589a70e1766ca63b6f3edab5ae197fe49511e25 (patch)
treeff0592a37679d7f4791b0f6cbec45b983f83ba25 /Doc
parent9499bb76a389142d7fd080945f5e449302a4c9a4 (diff)
downloadcpython-c589a70e1766ca63b6f3edab5ae197fe49511e25.zip
cpython-c589a70e1766ca63b6f3edab5ae197fe49511e25.tar.gz
cpython-c589a70e1766ca63b6f3edab5ae197fe49511e25.tar.bz2
#9438: clarify that constant names also cannot be assigned as attributes.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/constants.rst15
1 files changed, 6 insertions, 9 deletions
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst
index 89b7d71..b69d117 100644
--- a/Doc/library/constants.rst
+++ b/Doc/library/constants.rst
@@ -3,15 +3,6 @@ Built-in Constants
A small number of constants live in the built-in namespace. They are:
-
-.. note::
-
- :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` cannot be
- reassigned (assignments to them raise :exc:`SyntaxError`), so they can be
- considered "true" constants.
-
-.. XXX False, True, None are keywords too
-
.. data:: False
The false value of the :class:`bool` type. Assignments to ``False``
@@ -50,6 +41,12 @@ A small number of constants live in the built-in namespace. They are:
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
See also the :keyword:`assert` statement.
+.. note::
+
+ The names :data:`None`, :data:`False`, :data:`True` and :data:`__debug__`
+ cannot be reassigned (assignments to them, even as an attribute name, raise
+ :exc:`SyntaxError`), so they can be considered "true" constants.
+
Constants added by the :mod:`site` module
-----------------------------------------