mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Fix 2.7ism.
This commit is contained in:
parent
c438d1d021
commit
1ce3a6864c
1 changed files with 4 additions and 7 deletions
|
@ -42,17 +42,14 @@ A small number of constants live in the built-in namespace. They are:
|
||||||
.. data:: __debug__
|
.. data:: __debug__
|
||||||
|
|
||||||
This constant is true if Python was not started with an :option:`-O` option.
|
This constant is true if Python was not started with an :option:`-O` option.
|
||||||
See also the :keyword:`assert` statement.
|
It cannot be reassigned. See also the :keyword:`assert` statement.
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The names :data:`None` and :data:`__debug__` cannot be reassigned
|
The name :data:`None` cannot be reassigned (assignments to it, even as an
|
||||||
(assignments to them, even as an attribute name, raise :exc:`SyntaxError`),
|
attribute name, raise :exc:`SyntaxError`), so it can be considered a "true"
|
||||||
so they can be considered "true" constants.
|
constant.
|
||||||
|
|
||||||
.. versionchanged:: 2.7
|
|
||||||
Assignments to ``__debug__`` as an attribute became illegal.
|
|
||||||
|
|
||||||
|
|
||||||
Constants added by the :mod:`site` module
|
Constants added by the :mod:`site` module
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue