New submission from Martin Panter: >>> import importlib.util >>> importlib.util.resolve_name(".submodule", None) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/proj/python/cpython/Lib/importlib/util.py", line 26, in resolve_name '(no leading dot)'.format(name)) ValueError: '.submodule' is not a relative name (no leading dot)
This message sounds like nonsense. Perhaps the it should say something like: '.submodule' should be an absolute name (no leading dot) or: relative import of '.submodule' not allowed outside of a package ---------- keywords: easy messages: 255642 nosy: martin.panter priority: normal severity: normal status: open title: importlib: '.submodule' is not a relative name (no leading dot) type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25771> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com