[Python-checkins] bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349) (GH-27358)
terryjreedy
webhook-mailer at python.org
Sun Jul 25 21:40:40 EDT 2021
https://github.com/python/cpython/commit/4ce6c5285abd78dc936ec6036e7bb964fd55d955
commit: 4ce6c5285abd78dc936ec6036e7bb964fd55d955
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-07-25T21:40:36-04:00
summary:
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 at udel.edu>
(cherry picked from commit 0363a4014d90df17a29042de008ef0b659f92505)
Co-authored-by: Steven Hsu <hsuhaochun at gmail.com>
Co-authored-by: Steven Hsu <hsuhaochun at gmail.com>
files:
A Misc/NEWS.d/next/Documentation/2021-07-25-23-04-15.bpo-44693.JuCbNq.rst
M Doc/glossary.rst
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 4fd01e0160c26c..96d33ac1abb83f 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -426,12 +426,13 @@ Glossary
which describe this functionality.
__future__
- A pseudo-module which programmers can use to enable new language features
- which are not compatible with the current interpreter.
-
- By importing the :mod:`__future__` module and evaluating its variables,
- you can see when a new feature was first added to the language and when it
- becomes the default::
+ A :ref:`future statement <future>`, ``from __future__ import <feature>``,
+ directs the compiler to compile the current module using syntax or
+ semantics that will become standard in a future release of Python.
+ The :mod:`__future__` module documents the possible values of
+ *feature*. By importing this module and evaluating its variables,
+ you can see when a new feature was first added to the language and
+ when it will (or did) become the default::
>>> import __future__
>>> __future__.division
diff --git a/Misc/NEWS.d/next/Documentation/2021-07-25-23-04-15.bpo-44693.JuCbNq.rst b/Misc/NEWS.d/next/Documentation/2021-07-25-23-04-15.bpo-44693.JuCbNq.rst
new file mode 100644
index 00000000000000..614abb412df8ea
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2021-07-25-23-04-15.bpo-44693.JuCbNq.rst
@@ -0,0 +1,2 @@
+Update the definition of __future__ in the glossary by replacing the confusing
+word "pseudo-module" with a more accurate description.
More information about the Python-checkins
mailing list