Quentin Agren <quentin.ag...@gmail.com> added the comment:

Sorry for the misunderstanding, and thanks for clarifying!

So essentially what I am getting by `from app import __init__` is the 
`__init__` method of the module object bound to the name `app`.

However if I have a submodule `app/myapp.py`, `from app import myapp` will 
import it and bind it to the name `myapp`, whereas 
`importlib.import_module('app').myapp` raises AttributeError, so I guess the 
two forms not totally equivalent...


Anyways, I'll investigate deeper before creating an issue henceforth :)

----------
stage:  -> resolved
status: open -> closed

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

Reply via email to