summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-02 21:47:02 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-02 21:47:02 (GMT)
commit51449f5346bbea7832f03e3030bdaa9100ac9891 (patch)
treeb866f9810b3a2a9c021a408d6fcb7150779d467a
parent0771591fe1068c9b437bb92d3ac372d7c09b2ff3 (diff)
downloadcpython-51449f5346bbea7832f03e3030bdaa9100ac9891.zip
cpython-51449f5346bbea7832f03e3030bdaa9100ac9891.tar.gz
cpython-51449f5346bbea7832f03e3030bdaa9100ac9891.tar.bz2
Merged revisions 83567 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ................ r83567 | georg.brandl | 2010-08-02 22:32:03 +0200 (Mo, 02 Aug 2010) | 9 lines Merged revisions 83552 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83552 | georg.brandl | 2010-08-02 21:36:36 +0200 (Mo, 02 Aug 2010) | 1 line #9438: clarify that constant names also cannot be assigned as attributes. ........ ................
-rw-r--r--Doc/library/constants.rst14
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst
index b02e04e..80e792c 100644
--- a/Doc/library/constants.rst
+++ b/Doc/library/constants.rst
@@ -3,7 +3,6 @@ Built-in Constants
A small number of constants live in the built-in namespace. They are:
-
.. data:: False
The false value of the :class:`bool` type.
@@ -39,16 +38,23 @@ A small number of constants live in the built-in namespace. They are:
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
-----------------------------------------