mirror of
https://github.com/python/cpython.git
synced 2025-11-10 14:31:24 +00:00
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.
This commit is contained in:
parent
2219187cab
commit
1be456ae9d
1 changed files with 2 additions and 5 deletions
|
|
@ -874,14 +874,11 @@ can appear before a future statement are:
|
||||||
* blank lines, and
|
* blank lines, and
|
||||||
* other future statements.
|
* other future statements.
|
||||||
|
|
||||||
The only feature that requires using the future statement is
|
|
||||||
``annotations`` (see :pep:`563`).
|
|
||||||
|
|
||||||
All historical features enabled by the future statement are still recognized
|
All historical features enabled by the future statement are still recognized
|
||||||
by Python 3. The list includes ``absolute_import``, ``division``,
|
by Python 3. The list includes ``absolute_import``, ``division``,
|
||||||
``generators``, ``generator_stop``, ``unicode_literals``,
|
``generators``, ``generator_stop``, ``unicode_literals``,
|
||||||
``print_function``, ``nested_scopes`` and ``with_statement``. They are
|
``print_function``, ``nested_scopes``, ``with_statement`` and ``annotations``.
|
||||||
all redundant because they are always enabled, and only kept for
|
They are all redundant because they are always enabled, and only kept for
|
||||||
backwards compatibility.
|
backwards compatibility.
|
||||||
|
|
||||||
A future statement is recognized and treated specially at compile time: Changes
|
A future statement is recognized and treated specially at compile time: Changes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue