30.10.19 00:41, Steven D'Aprano пише:
Think about the behaviour of ``from module import name`` in pure
Python. Currently, it is straightforward to explain:

     try to import module, or fail if it doesn't exist;
     name = module.name, or fail if the name doesn't exist.

Things are more complicated. If module.name does not exist we try sys.modules["module.name"] (it is even more complicated in details).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/JC7VXXYPS3IX6SPEWNQDQ5PN3IL57EHZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to