R. David Murray <rdmur...@bitdance.com> added the comment: Yes, you are substantially correct. A subtlety that may enhance your understanding (if it doesn't instead totally confuse you :) is that __init__ is simply the most straightforward way to affect the module namespace. You would see the same phenomenon if in your package func had a submodule bar that did:
import func func.func = 1 from . import func func would now be 1, because it already exists in the module namespace at the point the relative import is done, so import just returns it, it doesn't go looking for a module to import. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33547> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com