Differences between revisions 4 and 5
Revision 4 as of 2007-07-15 04:36:45
Size: 2768
Editor: XiaoQi
Comment:
Revision 5 as of 2007-07-15 04:38:07
Size: 2804
Editor: XiaoQi
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
= 7-15<XOv1-4> Overview: Chapter 1-4 = = 7-15<Xr1-4> Review: Chapter 1-4 =
Line 4: Line 4:
{1} 表示原修改方案。 {1} 表示原修改方案,对应于原修订 List 中的 (./)

7-15<Xr1-4> Review: Chapter 1-4

重新审视了一下原来的修改方案,有不妥的,重新修改之后都纪录在这里。BR {1} 表示原修改方案,对应于原修订 List 中的 (./)

1. 安装 Python

1.2 Windows 上的 Python

  1. Para 2ActiveState 制作了一个 Windows 上的 Python安装程序称为 ActivePythonBR {1} ActiveState 发布 Windows 上的 Python 安装程序,叫做 ActivePythonBR (!) 要表达通顺,语序是非调整不可了BR (./) ActiveState 制作的 ActivePython 是专门针对 Windows 的 Python 套件

2. 第一个 Python 程序

2.4 万物皆对象

  1. 例2.3, (1)...as a module -- a chunk of code that you can use interactively, or from a larger Python program.BR 模块是指:可以交互使用的一个代码段,或者来自一个大规模的 Python 程序。BR {1} 模块是指:可以交互使用的一个代码段,或者一个大规模的 Python 程序的片段BR (!) 改了之后还是没译对,原文的语法结构还是弄错了BR (./) 模块是指一个可以交互使用,或者从另一 Python 程序访问的代码段。BR (!) 注意这里 larger 不再翻译了,因为原文的 larger 是指逻辑结构而不一定是规模,不好翻译。(比如说,建立一个最简单的访问 web 服务的程序,里面使用了 urllib 模块,不好说你建的程序的“规模”比 urllib 大,但逻辑意义上有确实比它大。)不翻译也不影响其意义。

3. 内置数据类型

3.5 格式化字符串

  1. 例3.23, (1)The %f string formatting option treats the value as a decimal,BR %f 格式符选项被认为是一个十进制浮点数BR {1} %f 格式符选项映射一个十进制浮点数BR (!) 想了想,“映射”还是不大妥当BR (./) %f 格式符选项对应一个十进制浮点数

4. 自省的威力

4.8 全部放在一起

  1. 例4.34, (1)Confusingly, if you evaluate the __doc__ attribute directly, the Python IDE prints nothing at all, which makes sense if you think about it, but is still unhelpful.BR 令人迷惑的是,如果你直接演算 __doc__ 属性的值,Python IDE 什么都不会打印,如果你只是考虑它,是有意义的,但是却没有什么用。BR {1} 这是有意义的,但是却没有什么用。BR (!) 发现不译 if you think about it 还是不甚妥当。把原译调整了一下语序,增加了字词。BR (./) 这是有意义的(前提是你考虑了这个结果的来由),但是却没有什么用。

DiveIntoPythonZh/2007-07-15 (last edited 2009-12-25 07:11:14 by localhost)