]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
authorSaiyang Gou <gousaiyang@163.com>
Wed, 7 Apr 2021 05:02:20 +0000 (22:02 -0700)
committerGitHub <noreply@github.com>
Wed, 7 Apr 2021 05:02:20 +0000 (22:02 -0700)
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.

Doc/reference/simple_stmts.rst

index 2c6c90140201c35e668e7a47b4f1f80026b53d18..3fff8484856ab1d02fc013aa69d8283d60f994e6 100644 (file)
@@ -874,14 +874,11 @@ can appear before a future statement are:
 * blank lines, and
 * 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
 by Python 3.  The list includes ``absolute_import``, ``division``,
 ``generators``, ``generator_stop``, ``unicode_literals``,
-``print_function``, ``nested_scopes`` and ``with_statement``.  They are
-all redundant because they are always enabled, and only kept for
+``print_function``, ``nested_scopes``, ``with_statement`` and ``annotations``.
+They are all redundant because they are always enabled, and only kept for
 backwards compatibility.
 
 A future statement is recognized and treated specially at compile time: Changes