Skip to content

Improve the documentation for __future__ #110893

@nedbat

Description

@nedbat

Documentation

(From Discourse: https://discuss.python.org/t/help-understanding-future-module-description/35442/5?u=nedbat)

I was confused by the first line in the docs for __future__

__future__ is a real module, and serves three purposes:

What does it mean by a “real” module? What are modules that aren’t “real”?

Then:

I’d say “real module” is strange all the time, and we don’t need it. "import __future__" serves three purposes is good.

What I would mostly like to change on that page is to document what each import does. The page spends a lot of words explaining the _Feature objects, which no one uses, but doesn’t say what (for example) from __future__ import annotations actually does. It links off to PEPs that are good historical records of decision making, but aren’t good ways to explain what Python does right now.

cc @merwok

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixes3.13bugs and security fixesdocsDocumentation in the Doc direasy

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions