Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ae28d2

Browse files
committed
Issue #20769: Improve reload() docs. Patch by Dorian Pula.
1 parent 2a8911c commit 1ae28d2

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

Doc/library/importlib.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ Functions
166166
except NameError:
167167
cache = {}
168168

169-
It is legal though generally not very useful to reload built-in or
170-
dynamically loaded modules (this is not true for e.g. :mod:`sys`,
171-
:mod:`__main__`, :mod:`builtins` and other key modules where reloading is
172-
frowned upon). In many cases, however, extension modules are not designed to
173-
be initialized more than once, and may fail in arbitrary ways when reloaded.
169+
It is generally not very useful to reload built-in or dynamically loaded
170+
modules. Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other
171+
key modules is not recommended. In many cases extension modules are not
172+
designed to be initialized more than once, and may fail in arbitrary ways
173+
when reloaded.
174174

175175
If a module imports objects from another module using :keyword:`from` ...
176176
:keyword:`import` ..., calling :func:`reload` for the other module does not

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,7 @@ Paul Prescod
10981098
Donovan Preston
10991099
Paul Price
11001100
Iuliia Proskurnia
1101+
Dorian Pula
11011102
Jyrki Pulliainen
11021103
Steve Purcell
11031104
Eduardo Pérez

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ C API
408408
Documentation
409409
-------------
410410

411+
- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
412+
411413
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
412414

413415
- Issue #24729: Correct IO tutorial to match implementation regarding

0 commit comments

Comments
 (0)