Skip to content

Commit 1be456a

Browse files
authored
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.
1 parent 2219187 commit 1be456a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Doc/reference/simple_stmts.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -874,14 +874,11 @@ can appear before a future statement are:
874874
* blank lines, and
875875
* other future statements.
876876

877-
The only feature that requires using the future statement is
878-
``annotations`` (see :pep:`563`).
879-
880877
All historical features enabled by the future statement are still recognized
881878
by Python 3. The list includes ``absolute_import``, ``division``,
882879
``generators``, ``generator_stop``, ``unicode_literals``,
883-
``print_function``, ``nested_scopes`` and ``with_statement``. They are
884-
all redundant because they are always enabled, and only kept for
880+
``print_function``, ``nested_scopes``, ``with_statement`` and ``annotations``.
881+
They are all redundant because they are always enabled, and only kept for
885882
backwards compatibility.
886883

887884
A future statement is recognized and treated specially at compile time: Changes

0 commit comments

Comments
 (0)