classification
Title: Reload() description is unclear
Type: Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: brett.cannon, docs@python, dorianpula, eric.smith, python-dev, r.david.murray, rbcollins, roysmith, wiggin15
Priority: normal Keywords: patch

Created on 2014-02-25 16:23 by roysmith, last changed 2015-08-04 20:33 by rbcollins. This issue is now closed.

Files
File name Uploaded Description Edit
reload_importlib_doc_py_3_5_fix.patch dorianpula, 2015-04-14 20:36 Python 3.5.0a patch for reload() documentation review
reload_builtin_functions_doc_py_2_7_fix.patch dorianpula, 2015-04-14 21:08 Python 2.7.x patch for reload() documentation review
Messages (9)
msg212187 - (view) Author: Roy Smith (roysmith) Date: 2014-02-25 16:23
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?
msg212198 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-02-25 18:52
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.
msg241029 - (view) Author: Dorian Pula (dorianpula) * Date: 2015-04-14 21:09
Attached patches with proposed change to the documentation to make the description clearer.

Please review and comment.
msg241267 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-16 19:37
Patch LGTM.
msg247994 - (view) Author: Robert Collins (rbcollins) * (Python committer) Date: 2015-08-04 20:07
24081 invalidates half the patch, but the other half still applies.
msg247996 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-04 20:16
New changeset cfd768814ca3 by Robert Collins in branch '2.7':
Issue #20769: Improve reload() docs. Patch by Dorian Pula.
https://hg.python.org/cpython/rev/cfd768814ca3
msg247997 - (view) Author: Robert Collins (rbcollins) * (Python committer) Date: 2015-08-04 20:17
2.7 side applied.
msg247999 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-04 20:32
New changeset 33dfbb293892 by Robert Collins in branch '3.4':
Issue #20769: Improve reload() docs. Patch by Dorian Pula.
https://hg.python.org/cpython/rev/33dfbb293892

New changeset 9fe1a440e4b8 by Robert Collins in branch '3.5':
Issue #20769: Improve reload() docs. Patch by Dorian Pula.
https://hg.python.org/cpython/rev/9fe1a440e4b8

New changeset 6778332f687a by Robert Collins in branch 'default':
Issue #20769: Improve reload() docs. Patch by Dorian Pula.
https://hg.python.org/cpython/rev/6778332f687a
msg248000 - (view) Author: Robert Collins (rbcollins) * (Python committer) Date: 2015-08-04 20:33
Thanks for the patch. Applied to 3.4/3.5/3.6 as well.
History
Date User Action Args
2015-08-04 20:33:15rbcollinssetstatus: open -> closed
resolution: fixed
messages: + msg248000

stage: commit review -> resolved
2015-08-04 20:32:40python-devsetmessages: + msg247999
2015-08-04 20:17:31rbcollinssetmessages: + msg247997
2015-08-04 20:16:57python-devsetnosy: + python-dev
messages: + msg247996
2015-08-04 20:07:55rbcollinssetnosy: + rbcollins

messages: + msg247994
versions: + Python 3.4, Python 3.6
2015-05-17 21:58:24wiggin15setnosy: + wiggin15
2015-04-16 19:37:32brett.cannonsetmessages: + msg241267
stage: commit review
2015-04-14 21:09:44dorianpulasetnosy: + dorianpula
messages: + msg241029
2015-04-14 21:08:50dorianpulasetfiles: + reload_builtin_functions_doc_py_2_7_fix.patch
2015-04-14 20:36:51dorianpulasetfiles: + reload_importlib_doc_py_3_5_fix.patch
keywords: + patch
versions: + Python 3.5
2014-02-25 18:52:03r.david.murraysetmessages: + msg212198
2014-02-25 18:51:22r.david.murraysetmessages: - msg212197
2014-02-25 18:50:28r.david.murraysetnosy: + r.david.murray, eric.smith, brett.cannon
messages: + msg212197
2014-02-25 16:23:55roysmithcreate