Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c589a70e
Commit
c589a70e
authored
Aug 02, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#9438: clarify that constant names also cannot be assigned as attributes.
parent
9499bb76
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
Doc/library/constants.rst
Doc/library/constants.rst
+6
-9
No files found.
Doc/library/constants.rst
View file @
c589a70e
...
...
@@ -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
-----------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment