Imports can be ambiguous in the face of packages; within a package, it's not clear whether import foo refers to a module within the package or some module outside the package. (More precisely, a local module or package can shadow another hanging directly off sys.path .)
... it is proposed that all import statements be absolute by default (searching sys.path only) with special syntax (leading dots) for accessing package-relative imports.
In Python 3, implicit relative imports within packages are no longer available - only absolute imports and explicit relative imports are supported. In addition, star imports (e.g. from x import * ) are only permitted in module level code.
这里并非是错误,直接导入当前目录下的模块的方式叫隐式相对导入,在 Python2 中可用。但因为存在覆盖导入的问题,在 Python3 中禁止了隐式相对导入。
PEP 328:
PEP 404: