Douglas Greiman added the comment: To be thorough, I looked at non __init__.py source files as well, with erratic results. And who knows what would happen on other OS's. So a blanket "must be a regular file" seems reasonable.
$ ls -l b.* lrwxrwxrwx 1 dgreiman eng 9 Dec 9 16:05 b.py -> /dev/null $ python2.7 -m b # Success $ python2.7 -c 'import b' # Success $ python2.7 b.py # Success $ python3.5 b.py # Success $ python3.5 -m b # Failure /opt/python3.5/bin/python3.5: No module named b $ python3.5 -c 'import b' # Failure Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named 'b' $ uname -a Linux 53334eb940e6 3.13.0-101-generic #148-Ubuntu SMP Thu Oct 20 22:08:32 UTC 2016 x86_64 GNU/Linux ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com