mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
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 0363a4014d
)
Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>
Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>
This commit is contained in:
parent
5a0c6abb56
commit
4ce6c5285a
2 changed files with 9 additions and 6 deletions
|
@ -426,12 +426,13 @@ Glossary
|
||||||
which describe this functionality.
|
which describe this functionality.
|
||||||
|
|
||||||
__future__
|
__future__
|
||||||
A pseudo-module which programmers can use to enable new language features
|
A :ref:`future statement <future>`, ``from __future__ import <feature>``,
|
||||||
which are not compatible with the current interpreter.
|
directs the compiler to compile the current module using syntax or
|
||||||
|
semantics that will become standard in a future release of Python.
|
||||||
By importing the :mod:`__future__` module and evaluating its variables,
|
The :mod:`__future__` module documents the possible values of
|
||||||
you can see when a new feature was first added to the language and when it
|
*feature*. By importing this module and evaluating its variables,
|
||||||
becomes the default::
|
you can see when a new feature was first added to the language and
|
||||||
|
when it will (or did) become the default::
|
||||||
|
|
||||||
>>> import __future__
|
>>> import __future__
|
||||||
>>> __future__.division
|
>>> __future__.division
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Update the definition of __future__ in the glossary by replacing the confusing
|
||||||
|
word "pseudo-module" with a more accurate description.
|
Loading…
Add table
Add a link
Reference in a new issue