近期在看源码时发现了这个问题,百度了半天没有查到,在StackOverflow上找到了,记录一下
类似的代码就像这种,from后面的包前面有一个点
from ._utils import _import_dotted_name
from ._utils_internal import get_file_path, prepare_multiprocessing_environment
from .version import __version__
from ._six import string_classes as _string_classes
https://docs.python.org/3/tutorial/modules.html#importing-from-a-package 见6.4.2. Intra-package References