-
-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
"This module is always available" is confusing #81089
Comments
The math and cmath modules say this in their docs: "This module is always available." This lead a beginner to believe they didn't need to be imported. Nearly the entire standard library is always available in this sense (they can be imported). This sentence isn't useful. Can we change the first paragraph of the math module to be: "This module provides access to the mathematical functions defined by the C standard." (and similarly for the cmath module.) |
I agree the wording "is always available" is quite ambiguous. It's just that we use this phrase pretty much everywhere... Example: https://docs.python.org/3/library/threading.html?highlight=threading#module-threading "This module used to be optional, it is now always available." I wonder if it will be clearer if it says "is available across all platforms"? |
If we want to keep it, how about "it can always be imported."? Though I still wonder whether this is worth it. Are we going to annotate all of the always-available modules with this notation? |
Looks like these modules describe themselves as always available: _thread, sys, threading, time. Notice that the built-ins are also described as "always available", which is the meaning we're trying to move math away from (you can use them without importing anything). |
I agree. What about create a section (or subsection?) or note with
? |
There are hundreds of modules that are always importable. The majority of the standard library is always importable. More useful would be to annotate those modules that might not be importable, with a reason why. |
yes, that is more reasonable. :-D |
In future we should do the similar change for any module. This will be helpful for new beginners. |
Thanks all. I've backported the change to 3.7. I think this is good to be closed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: