[issue13048] Handling of paths in first argument of imp.find_module()

New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>: It's undocumented that imp.find_module() supports paths with "/" as the first argument: $ mkdir /tmp/imp_tests $ cd /tmp/imp_tests $ mkdir a $ touch a/b.py $ python3.3 -c 'import imp; print(imp.find_module("a/b"))' (<_io.TextIOWrapper name=4 mode='U' encoding='utf-8'>, 'a/b.py', ('.py', 'U', 1)) ---------- assignee: docs@python components: Documentation, Interpreter Core messages: 144532 nosy: Arfrever, brett.cannon, docs@python, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: Handling of paths in first argument of imp.find_module() versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13048> _______________________________________

Brett Cannon <brett@python.org> added the comment: It's probably not a bad thing it's undocumented either since importing by file path was removed in Python 3, so this is another case where imp.find_module() differentiates from __import__. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13048> _______________________________________

Changes by Brett Cannon <brett@python.org>: ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13048> _______________________________________
participants (2)
-
Arfrever Frehtes Taifersar Arahesis
-
Brett Cannon