diff -r 8ee2b193cff4 Doc/faq/programming.rst --- a/Doc/faq/programming.rst Sat Aug 02 11:38:09 2014 +0300 +++ b/Doc/faq/programming.rst Sat Aug 02 17:29:24 2014 +0300 @@ -1786,19 +1786,10 @@ __import__('x.y.z') returns ; how do I get z? --------------------------------------------------------- -Try:: +Consider using instead the convenience function :func:`~importlib.import_module` from +:mod:`importlib` :: - __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`. - + 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?