8000 bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349) (GH… · python/cpython@642d873 · GitHub
[go: up one dir, main page]

Skip to content

Commit 642d873

Browse files
bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349) (GH-27357)
Replace sentence with confusing "pseudo-module" with two sentences separating future statements and the __future__ module. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 0363a40) Co-authored-by: Steven Hsu <hsuhaochun@gmail.com> Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>
1 parent 01601aa commit 642d873

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Doc/glossary.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,13 @@ Glossary
461461
for best practices on working with annotations.
462462

463463
__future__
464-
A pseudo-module which programmers can use to enable new language features
465-
which are not compatible with the current interpreter.
466-
467-
By importing the :mod:`__future__` module and evaluating its variables,
468-
you can see when a new feature was first added to the language and when it
469-
becomes the default::
464+
A :ref:`future statement <future>`, ``from __future__ import <feature>``,
465+
directs the compiler to compile the current module using syntax or
466+
semantics that will become standard in a future release of Python.
467+
The :mod:`__future__` module documents the possible values of
468+
*feature*. By importing this module and evaluating its variables,
469+
you can see when a new feature was first added to the language and
470+
when it will (or did) become the default::
470471

471472
>>> import __future__
472473
>>> __future__.division
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update the definition of __future__ in the glossary by replacing the confusing
2+
word "pseudo-module" with a more accurate description.

0 commit comments

Comments
 (0)
0