Brett Cannon added the comment: When you execute a module on the command line, sys.path[0] is set to that containing directory (e.g. pkg/tests in your example; just have pkg/tests/__init__.py print out sys.path to see what I mean). ``import http`` is going to look on sys.path no matter what, and with ``pkg/tests`` being the first entry on sys.path, its going to find pkg/tests/http.py before it even has a chance to look in the directory containing the stdlib. A bare import only means "look on sys.path", not "magically only look in the stdlib".
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16570> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com