python 中 from ... import 包时包前面有一个点(.)

近期在看源码时发现了这个问题,百度了半天没有查到,在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://stackoverflow.com/questions/7279810/what-does-a-in-an-import-statement-in-python-mean

https://stackoverflow.com/questions/22511792/python-from-dotpackage-import-syntax

https://docs.python.org/3/tutorial/modules.html#importing-from-a-package            见6.4.2. Intra-package References

https://docs.python.org/release/2.5.2/ref/import.html#tok-relative_module

ON OFF
即划即译
 
即划即译
关闭即划即译 反馈 帮助
 

正在加载数据,请稍后...

 
 
搞定邮箱/文档/PDF取词?下载PC版

 

取词插件加载成功

你可能感兴趣的:(●,Python,●,StackOverflow,&&,问题解决)