-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the documentation for __future__ #110893
Comments
Can we use something like this as an introduction? The
For example, the import statement |
It’s not the __future__ module that is a special tool, but the __future__ imports |
I suggest a general / user-facing introduction along the lines: The To activate a feature, import it from the After that, you can go into all the technical details and reasoning. |
Hey @nedbat I noticed you opened issue #110893 about improving the documentation for the future module. As a user of future imports, I agree the current docs could be clearer, especially around what each import actually does. If anyone is not working on it right now then i would love to work on this documentation improvement? |
Yes, you can take this! |
Hey, what about "barry_as_FLUFL" .. future.py file is not currently documented on the official documentation page (https://docs.python.org/3/library/__future__.html#module-__future__) |
In my opinion, that is a joke, and can remain an undocumented easter egg. |
hey, The To use a specific feature, import it from the Once a feature has been imported, the In the OptionalRelease and MandatoryRelease are both 5-tuples of the same form as sys.version_info.The format of the 5-tuples is as follows:
These 5-tuples provide version information about the releases in which a feature was accepted or became part of the language. Release Information for Features: The release information for features is captured through OptionalRelease and MandatoryRelease.The OptionalRelease records the first release in which the feature was accepted and MandatoryRelease records when the feature became part of the language. Once a feature is included in a MandatoryRelease, modules no longer need a future statement to use the feature, but they may continue to use such imports if needed. Instances of the class The CompilerFlag is a bitfield flag that should be passed in the fourth argument to the built-in function |
Can someone make a pull request to propose changes? See https://devguide.python.org/ for guidance I’ll suggest to avoid changing too much text if possible, and improving the general description without going too deep into details (like the line |
Yeh Sure, I'll do that...and make required changes...asap |
Hello, The To use a specific feature, import it from the Once a feature has been imported, the OptionalRelease and MandatoryRelease are both 5-tuples of the same form as sys.version_info.The format of the 5-tuples is as follows:
These 5-tuples provide version information about the releases in which a feature was accepted or became part of the language. Release Information for Features: The release information for features is captured through OptionalRelease and MandatoryRelease.The OptionalRelease records the first release in which the feature was accepted and MandatoryRelease records when the feature became part of the language. Once a feature is included in a MandatoryRelease, modules no longer need a future statement to use the feature, but they may continue to use such imports if needed. Instances of the class The CompilerFlag is a bitfield flag that should be passed in the fourth argument to the built-in function |
Please make a pull request not big posts here |
Can I work on this? |
Let’s see if Anuj turns the comment here into a pull request first, and if there’s no activity then you can try 🙂 |
soon, I'll PR. I've been unwell this month. |
Seen it, not had the time yet to review. |
so is this issue now solved? or we can still work on it? @merwok |
@vaishnavi192 There's still an open PR (#112348), let's be patient and wait for that to be reviewed first. |
nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top.
nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top.
…honGH-114642) nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top. (cherry picked from commit 3b86891) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…honGH-114642) nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top. (cherry picked from commit 3b86891) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…-114642) (#114703) gh-110893: Improve the documentation for __future__ module (GH-114642) nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top. (cherry picked from commit 3b86891) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…-114642) (#114702) gh-110893: Improve the documentation for __future__ module (GH-114642) nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top. (cherry picked from commit 3b86891) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…hon#114642) nedbat took issue with the phrasing "real module". I'm actually fine with that phrasing, but I do think the `__future__` page should be clear about the way in which the `__future__` module is special. (Yes, there was a footnote linking to the future statements part of the reference, but there should be upfront discussion). I'm sympathetic to nedbat's claim that no one really cares about `__future__._Feature`, so I've moved the interesting table up to the top.
I have done some changes which are definitely helpful related to your problem. Can you please give me the access |
Documentation
(From Discourse: https://discuss.python.org/t/help-understanding-future-module-description/35442/5?u=nedbat)
Then:
cc @merwok
Linked PRs
__future__
module #112348The text was updated successfully, but these errors were encountered: