Ezio Melotti added the comment:
> I think this is due to PEP 420 Namespace Packages.
It works on Python 2 too:
$ ls execdir/
foo.py __main__.py
$ cat execdir/foo.py
print("foo imported")
$ cat execdir/__main__.py
import foo; print("main imported")
$ python execdir/
foo imported
main imported
$ python -V
Python 2.7.8
I haven't done any tests about the interaction of namespace packages and
__main__.py, but if there are additional semantics, they should be documented
as well.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24632>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com