消息 [346654]
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:28 | brett.cannon | 修改 | recipients:
+ brett.cannon, eric.smith, Ben Lewis2 |
| 2019-06-26 18:05:28 | brett.cannon | 修改 | messageid: <1561572328.47.0.816332616208.issue37409@roundup.psfhosted.org> |
| 2019-06-26 18:05:28 | brett.cannon | 链接 | issue37409 messages |
| 2019-06-26 18:05:28 | brett.cannon | 创建 | |
|