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
Reload() description is unclear #64968
Comments
http://docs.python.org/2/library/functions.html#reload says: It is legal though generally not very useful to reload built-in or dynamically loaded modules, except for sys, __main__ and __builtin__. It is unclear what the "except for ..." part is referring to. Is it not legal to reload those modules? Or is it not very useful to reload them? |
The python3 docs say: "It is legal though generally not very useful to reload built-in or dynamically loaded modules (this is not true for e.g. sys, __main__, builtins and other key modules where reloading is frowned upon)." So, it is the former...sort of. You don't get an error when you reload them, so implying that it is not "legal" is an odd phrasing. Probably that sentence should be clarified in both the python2 and python3 docs. |
Attached patches with proposed change to the documentation to make the description clearer. Please review and comment. |
Patch LGTM. |
24081 invalidates half the patch, but the other half still applies. |
New changeset cfd768814ca3 by Robert Collins in branch '2.7': |
2.7 side applied. |
New changeset 33dfbb293892 by Robert Collins in branch '3.4': New changeset 9fe1a440e4b8 by Robert Collins in branch '3.5': New changeset 6778332f687a by Robert Collins in branch 'default': |
Thanks for the patch. Applied to 3.4/3.5/3.6 as well. |
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: