On 8/25/2013 7:54 AM, Stefan Behnel wrote:

And what if you do "from extmodule import some_function" in a Python
module? Then reloading couldn't replace that reference, just as for normal
Python modules. Meaning that you'd still have to keep both modules properly
alive in order to prevent crashes due to lost global state of the imported
function.

People who want to reload modules sometimes know before they start that they will want to. If so, they can just 'import' instead of 'from import' and access everything through the module. There is still the problem of persistent class instances directly accessing classes for attributes, but maybe that can be directed through the class also.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to