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
48b8e4af
Commit
48b8e4af
authored
Aug 04, 2014
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
#18034: merge with 3.4.
parents
17c33628
e4aad5ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
Doc/faq/programming.rst
Doc/faq/programming.rst
+3
-12
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Doc/faq/programming.rst
View file @
48b8e4af
...
...
@@ -1786,19 +1786,10 @@ These solutions are not mutually exclusive.
__import__('x.y.z') returns <module 'x'>; how do I get z?
---------------------------------------------------------
Try::
__import__('x.y.z').y.z
For more realistic situations, you may have to do something like ::
m = __import__(s)
for i in s.split(".")[1:]:
m = getattr(m, i)
See :mod:`importlib` for a convenience function called
:func:`~importlib.import_module`.
Consider using the convenience function :func:`~importlib.import_module` from
:mod:`importlib` instead::
z = importlib.import_module('x.y.z')
When I edit an imported module and reimport it, the changes don't show up. Why does this happen?
...
...
Misc/ACKS
View file @
48b8e4af
...
...
@@ -553,6 +553,7 @@ Bernhard Herzog
Magnus L. Hetland
Raymond Hettinger
Kevan Heydon
Wouter van Heyst
Kelsey Hightower
Jason Hildebrand
Richie Hindle
...
...
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