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

Skip to content

Commit 6d877ef

Browse files
committed
#24081: Remove obsolete caveat from import docs.
Per Eric Snow's research, this changed in Python 2.4 in changeset 331e60d8ce, but these docs were not updated. Patch by Peter Viktorin.
1 parent c6249a6 commit 6d877ef

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

Doc/library/imp.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,6 @@ This module provides an interface to the mechanisms used to implement the
149149

150150
There are a number of other caveats:
151151

152-
If a module is syntactically correct but its initialization fails, the first
153-
:keyword:`import` statement for it does not bind its name locally, but does
154-
store a (partially initialized) module object in ``sys.modules``. To reload the
155-
module you must first :keyword:`import` it again (this will bind the name to the
156-
partially initialized module object) before you can :func:`reload` it.
157-
158152
When a module is reloaded, its dictionary (containing the module's global
159153
variables) is retained. Redefinitions of names will override the old
160154
definitions, so this is generally not a problem. If the new version of a module

Doc/library/importlib.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ Functions
152152

153153
There are a number of other caveats:
154154

155-
If a module is syntactically correct but its initialization fails, the first
156-
:keyword:`import` statement for it does not bind its name locally, but does
157-
store a (partially initialized) module object in ``sys.modules``. To reload
158-
the module you must first :keyword:`import` it again (this will bind the name
159-
to the partially initialized module object) before you can :func:`reload` it.
160-
161155
When a module is reloaded, its dictionary (containing the module's global
162156
variables) is retained. Redefinitions of names will override the old
163157
definitions, so this is generally not a problem. If the new version of a

0 commit comments

Comments
 (0)