changeset: 91997:f78ef3819d67 parent: 91995:7bc53cf8b2df parent: 91996:815f1a69283e user: Ezio Melotti date: Mon Aug 04 19:34:57 2014 +0300 files: Misc/ACKS description: #18034: merge with 3.4. diff -r 7bc53cf8b2df -r f78ef3819d67 Doc/faq/programming.rst --- a/Doc/faq/programming.rst Mon Aug 04 11:18:23 2014 -0500 +++ b/Doc/faq/programming.rst Mon Aug 04 19:34:57 2014 +0300 @@ -1786,19 +1786,10 @@ __import__('x.y.z') returns ; how do I get z? --------------------------------------------------------- -Try:: - - __import__('x.y.z').y.z - -For more realistic situations, you may have to do something like :: +Consider using the convenience function :func:`~importlib.import_module` from +:mod:`importlib` instead:: - 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`. - + 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? diff -r 7bc53cf8b2df -r f78ef3819d67 Misc/ACKS --- a/Misc/ACKS Mon Aug 04 11:18:23 2014 -0500 +++ b/Misc/ACKS Mon Aug 04 19:34:57 2014 +0300 @@ -553,6 +553,7 @@ Magnus L. Hetland Raymond Hettinger Kevan Heydon +Wouter van Heyst Kelsey Hightower Jason Hildebrand Richie Hindle

AltStyle によって変換されたページ (->オリジナル) /