David Beazley added the comment:

inal comment.  It seems that one can generally avoid a lot of nastiness if 
importlib.reload() is used instead.  For example:

>>> mod = sys.modules[spec.name] = module_from_spec(spec)
>>> importlib.reload(mod)

This works for both source and Extension modules and completely avoids the need 
to worry about the exec_module()/load_module() warts.   Wouldn't say it's an 
obvious approach though ;-).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23642>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to