有人能解释一下这两者之间的区别吗?
1. `from x import y` 2. `from .x import y`
看起来第一个会仅在`PYTHONPATH`中或当前工作目录中导入`x`,但我在文档https://docs.python.org/3/reference/import.html中没有看到任何关于这种语法的参考。
1. `from x import y` 2. `from .x import y`
看起来第一个会仅在`PYTHONPATH`中或当前工作目录中导入`x`,但我在文档https://docs.python.org/3/reference/import.html中没有看到任何关于这种语法的参考。