Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
deed2153
Commit
deed2153
authored
May 02, 2015
by
R David Murray
Browse files
Options
Browse Files
Download
Plain Diff
Merge: #24081: Remove obsolete caveat from import docs.
parents
7b3b98c9
6d877ef0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
12 deletions
+0
-12
Doc/library/imp.rst
Doc/library/imp.rst
+0
-6
Doc/library/importlib.rst
Doc/library/importlib.rst
+0
-6
No files found.
Doc/library/imp.rst
View file @
deed2153
...
...
@@ -149,12 +149,6 @@ This module provides an interface to the mechanisms used to implement the
There are a number of other caveats:
If a module is syntactically correct but its initialization fails, the first
:keyword:`import` statement for it does not bind its name locally, but does
store a (partially initialized) module object in ``sys.modules``. To reload the
module you must first :keyword:`import` it again (this will bind the name to the
partially initialized module object) before you can :func:`reload` it.
When a module is reloaded, its dictionary (containing the module's global
variables) is retained. Redefinitions of names will override the old
definitions, so this is generally not a problem. If the new version of a module
...
...
Doc/library/importlib.rst
View file @
deed2153
...
...
@@ -159,12 +159,6 @@ Functions
There
are
a
number
of
other
caveats
:
If
a
module
is
syntactically
correct
but
its
initialization
fails
,
the
first
:
keyword
:`
import
`
statement
for
it
does
not
bind
its
name
locally
,
but
does
store
a
(
partially
initialized
)
module
object
in
``
sys
.
modules
``.
To
reload
the
module
you
must
first
:
keyword
:`
import
`
it
again
(
this
will
bind
the
name
to
the
partially
initialized
module
object
)
before
you
can
:
func
:`
reload
`
it
.
When
a
module
is
reloaded
,
its
dictionary
(
containing
the
module
's global
variables) is retained. Redefinitions of names will override the old
definitions, so this is generally not a problem. If the new version of a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment