[New-bugs-announce] [issue8836] Conflicting default values of parameter to __import__

Anthony Foglia report at bugs.python.org
Fri May 28 00:26:16 CEST 2010


New submission from Anthony Foglia <afoglia at gmail.com>:

Looking at the documentation for the __import__ builtin, the default value of the level parameter is unclear.  Two different values are mentioned.  The function signature is written:

__import__(name, globals={}, locals={}, fromlist=[], level=-1)

But the third paragraph begins: "level specifies whether to use absolute or relative imports. 0 (the default) means only perform absolute imports."

So which is it, -1 or 0?

I'm guessing 0.  If -1 is still a valid value, it needs to be described.

----------
assignee: docs at python
components: Documentation
messages: 106621
nosy: afoglia, docs at python
priority: normal
severity: normal
status: open
title: Conflicting default values of parameter to __import__
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8836>
_______________________________________


More information about the New-bugs-announce mailing list