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

Skip to content

Commit 4ce6c52

Browse files
bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349) (GH-27358)
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 5a0c6ab commit 4ce6c52

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
@@ -426,12 +426,13 @@ Glossary
426426
which describe this functionality.
427427

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

436437
>>> import __future__
437438
>>> __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