#9438: clarify that constant names also cannot be assigned as attributes.
This commit is contained in:
parent
9499bb76a3
commit
c589a70e17
|
@ -3,15 +3,6 @@ Built-in Constants
|
||||||
|
|
||||||
A small number of constants live in the built-in namespace. They are:
|
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
|
.. data:: False
|
||||||
|
|
||||||
The false value of the :class:`bool` type. Assignments to ``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`.
|
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
|
||||||
See also the :keyword:`assert` statement.
|
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
|
Constants added by the :mod:`site` module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue