← 输入框|bugs.python.org|刷新

➜

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.

作者 brett.cannon
收信人 Ben Lewis2, brett.cannon, eric.smith
日期 2019-06-26.18:05:28
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1561572328.47.0.816332616208.issue37409@roundup.psfhosted.org>
In-reply-to
内容
I can't reproduce:

>>> from importlib import abc
>>> from . import util
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'util' from '__main__' (unknown location)
>>> import importlib.util
>>>

Did you happen to do an `import *` prior to this in your REPL? If so that might explain it as you could have pulled in __package__ and such and that's used to resolve relative imports.
历史
日期 用户 动作 参数
2019-06-26 18:05:28brett.cannon修改recipients: + brett.cannon, eric.smith, Ben Lewis2
2019-06-26 18:05:28brett.cannon修改messageid: <1561572328.47.0.816332616208.issue37409@roundup.psfhosted.org>
2019-06-26 18:05:28brett.cannon链接issue37409 messages
2019-06-26 18:05:28brett.cannon创建