yidao620c / python3-cookbook

《Python Cookbook》 3rd Edition Translation
11.63k stars 2.96k forks source link

10.3节中有一处翻译错误 #359

Open zhouyc98 opened 2 years ago

zhouyc98 commented 2 years ago

10.3 使用相对路径名导入包中子模块中,有:

import语句的 . 和 .. 看起来很滑稽, 但它指定目录名.为当前目录,..B为目录../B。这种语法只适用于import

此处句子最后的「只适用于import」应更正为「只适用于from形式的import」,英文原文为:

The . and .. syntax on the import statement might look funny, but think of it as specifying a directory name. . means look in the current directory and ..B means look in the ../B directory. This syntax only works with the from form of import.

renzituo95 commented 1 year ago

这两天不上线了.有事给我发短信.回头见.!