[Import-sig] Why add '' to sys.path if there's an __init__.py?
Fred L. Drake, Jr.
Mon, 2 Oct 2000 20:18:24 -0400 (EDT)
Guido van Rossum writes:
> Very clever. But what if the package's (grand*)parent is *not* on
> sys.path? I say it's a user error and that's that.
In that case, the problem (file importable by more than one module
name) does not exist, and the ImportError is raised.
The solution I proposed doesn't mask the error in any way, it
clarifies it by raising an ImportError. I think it improves the
situation by producing less user confusion.
Fred L. Drake, Jr. <fdrake at beopen.com>
BeOpen PythonLabs Team Member