STINNER Victor added the comment:

Oh, I didn't realize that the documentation says that the default value is -1.
http://docs.python.org/library/functions.html#__import__

"level specifies whether to use absolute or relative imports. The default is -1 
which indicates both absolute and relative imports will be attempted. 0 means 
only perform absolute imports. Positive values for level indicate the number of 
parent directories to search relative to the directory of the module calling 
__import__()."

We should probably tolerate -1, or just drop the exception.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15610>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to