This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Conflicting default values of parameter to __import__
Type: Stage:
Components: Documentation Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: afoglia, benjamin.peterson, docs@python
Priority: normal Keywords:

Created on 2010-05-27 22:26 by afoglia, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg106621 - (view) Author: Anthony Foglia (afoglia) Date: 2010-05-27 22:26
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.
msg106623 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-05-27 22:32
Fixed in r81572.
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53082
2010-05-27 22:32:49benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg106623

resolution: fixed
2010-05-27 22:26:15afogliacreate