Dive-Into-Python-中文版-七-

40 阅读1小时+

Dive Into Python 中文版(七)

附录 E. 修订历史

附录 E. 修订历史

2007-09-01 (5.4b)

  • XiaQ (xiaqqaix AT gmail DOT com) 进行了 Dive Into Python 中文版的修订工作,重发布为 5.4b 版。可以在 Dive Into Python 中文版的项目主页上找到一份完整的 (同时也是及其冗长的) 修订清单。注意原英文版不含 5.4b 版。

2006-04-25 (5.4 中文版)

参加了 Dive Into Python 中文版 5.4 版翻译的有:

  • limodou (limodou AT gmail DOT com)
  • Zoom.Quiet (zoom.quiet AT gmail DOT com)
  • Jason Xie (jason AT sinoesl DOT org)
  • YuLin (yulin724 AT gmail DOT com)
  • Weigang LI (dimens AT gmail DOT com)
  • wolfg (wolfg1969 AT gmail DOT com)
  • Osmond (sinosmond AT gmail DOT com)

2004-05-20 (5.4)

  • 添加了 第 12.1 节 “概览”。
  • 添加了 第 12.2 节 “安装 SOAP 库”。
  • 添加了 第 12.3 节 “步入 SOAP”。
  • 添加了 第 12.4 节 “ SOAP 网络服务查错”。
  • 添加了 第 12.5 节 “WSDL 介绍”。
  • 添加了 第 12.6 节 “以 WSDL 进行 SOAP 内省”。
  • 添加了 第 12.7 节 “搜索 Google”。
  • 添加了 第 12.8 节 “ SOAP 网络服务故障排除”。
  • 添加了 第 12.9 节 “小结”。
  • 修改了 第十六章 函数编程 和 第十八章 性能优化 中的大量技术评论。

2004-05-12 (5.3)

  • 为 第 18.3 节 “优化正则表达式” 添加了 isalpha() 的示例。感谢你,Paul。
  • 对 第五章 对象和面向对象 和 第六章 异常和文件处理 进行了大量修改。
  • 修正了 第 9.7 节 “Segue ” 中的 URL 地址。

2004-05-09 (5.2)

  • 修正了 第 14.1 节 “roman.py, 第 1 阶段” 中的一个 URL 地址。
  • 添加了 第 18.1 节 “概览”。
  • 添加了 第 18.2 节 “使用 timeit 模块”。
  • 添加了 第 18.3 节 “优化正则表达式”。
  • 添加了 第 18.4 节 “优化字典查找”。
  • 添加了 第 18.5 节 “优化列表操作”。
  • 添加了 第 18.6 节 “优化字符串操作”。
  • 添加了 第 18.7 节 “小结”。

2004-05-05 (5.1)

  • 修订了 例 7.7 “校验十位数” 和 例 7.8 “用 {n,m} 语法确认罗马数字”。
  • 修订了 例 7.10 “发现数字” 。
  • 修正了 例 11.6 “测试 Last-Modified” 中的拼写错误。感谢你,Jesir。
  • 修正了 例 3.11 “extend (扩展) 与 append (追加) 的差别” 与 append (追加) 的差别") 中的拼写错误。感谢你,Daniel。
  • 修改了大量技术评论。
  • 对 第一章 安装 Python、第二章 第一个 Python 程序、第三章 内置数据类型 和 第四章 自省的威力 进行了大量修改。

2004-04-16 (5.0)

  • 添加了 第 11.1 节 “概览”.
  • 添加了 第 11.2 节 “避免通过 HTTP 重复地获取数据”.
  • 添加了 第 11.3 节 “HTTP 的特性”.
  • 添加了 第 11.4 节 “调试 HTTP web 服务”.
  • 添加了 第 11.5 节 “设置 User-Agent”.
  • 添加了 第 11.6 节 “处理 Last-Modified 和 ETag”.
  • 添加了 第 11.7 节 “处理重定向”.
  • 添加了 第 11.8 节 “处理压缩数据”.
  • 添加了 第 11.9 节 “全部放在一起”.
  • 添加了 第 11.10 节 “小结”.
  • 添加了 例 3.11 “extend (扩展) 与 append (追加) 的差别” 与 append (追加) 的差别").
  • 在 第一章 安装 Python 中修改了关于如何下载 Python 的描述,使其更一般化,且减少了版本依赖性。
  • 在 第 2.1 节 “概览” 和 第 2.4 节 “万物皆对象” 中,把术语 “module” (模块) 改为了 “program” (程序),因为我们此时尚未介绍模块。
  • 在 第 2.4 节 “万物皆对象” 中,添加了打开 Python IDE 的详细说明,和原来的例子合并在一起。
  • 把所有引用到布尔值 1 (真) 和 0 (假) 分别改为了 TrueFalse
  • 更新了 例 3.22 “字符串格式化与字符串连接的比较” ,以展示 Python 2.3 所显示的TypeError 消息。
  • 修正了 例 17.19 “使用生成器替代递归” 中的拼写错误。
  • 修正了 第 7.7 节 “小结” 中的拼写错误。
  • 修正了 例 17.9 “plural4.py” 中的拼写错误。

2004-03-25 (4.9)

  • 完成了 第 16.7 节 “全部放在一起”。
  • 添加了 第 16.8 节 “小结”。
  • 把对单元测试的介绍分成了两章: 第十三章 单元测试 和 第十四章 测试优先编程
  • 修正了 例 17.12 “plural4.py 的完成” 中的拼写错误。
  • 修正了 例 17.18 “介绍生成器” 中的拼写错误。

2004-03-25 (4.8)

  • 完成了 第 17.7 节 “plural.py, 第 6 阶段”。
  • 完成了 第 17.8 节 “小结”。
  • 修复了 附录 A, 进一步阅读、附录 B, 五分钟回顾、附录 C, 技巧和窍门和附录 D, 示例清单中的失效链接。

2004-03-21 (4.7)

  • 添加了 第 17.1 节 “概览”。
  • 添加了 第 17.2 节 “plural.py, 第 1 阶段”。
  • 添加了 第 17.3 节 “plural.py, 第 2 阶段”。
  • 添加了 第 17.4 节 “plural.py, 第 3 阶段”。
  • 添加了 第 17.5 节 “plural.py, 第 4 阶段”。
  • 添加了 第 17.6 节 “plural.py, 第 5 阶段”。
  • 添加了 第 17.7 节 “plural.py, 第 6 阶段” (未完成)。
  • 添加了 第 17.8 节 “小结” (未完成)。

2004-03-14 (4.6)

  • 完成了 第 7.4 节 “使用 {n,m} 语法”。
  • 完成了 第 7.5 节 “松散正则表达式”。
  • 完成了 第 7.6 节 “个案研究:解析电话号码”。
  • 扩写了 第 7.7 节 “小结”。

2004-03-07 (4.5)

  • 添加了 第 7.1 节 “概览”。
  • 添加了 第 7.4 节 “使用 {n,m} 语法” (未完成)。
  • 添加了 第 7.5 节 “松散正则表达式” (未完成)。
  • 添加了 第 7.6 节 “个案研究:解析电话号码” (未完成)。
  • 添加了 第 7.7 节 “小结”。
  • 把 第 7.2 节 “个案研究:街道地址” 和 第 7.3 节 “个案研究:罗马字母” 移入了正则表达式这一章。
  • 添加了 例 6.20 “使用 glob 列出目录”。
  • 添加了 例 6.7 “写入文件”。
  • 添加了 例 5.11 “直接继承自内建数据类型 dict”。
  • 添加了 例 10.11 “打印到 stderr”。
  • 添加了 例 4.12 “使用 getattr 创建分发者” 和 例 4.13 “getattr 缺省值”。
  • 添加了 例 2.6 “if 语句”。
  • 添加了 例 3.23 “数值的格式化”。
  • 把 第五章 对象和面向对象 分成了两章:第五章 对象和面向对象 和 第六章 异常和文件处理
  • 把 第九章 XML 处理 分成了两章:第九章 XML 处理 和 第十章 脚本和流
  • 把 第十三章 单元测试 分成了两章:第十三章 单元测试 和 第十五章 重构
  • 把 第四章 自省的威力 中的 help 改名为 info
  • 修正了 第 8.5 节 “locals 和 globals” 中的回向引用。
  • 修复了 第 8.1 节 “概览” 中失效的示例链接。
  • 修复了 第 9.1 节 “概览” 示例中丢失的若干行。
  • 修正了 第 8.2 节 “sgmllib.py 介绍” 中的拼写错误。

2003-10-08 (4.4)

  • 添加了 第 1.1 节 “哪一种 Python 适合您?”。
  • 添加了 第 1.2 节 “Windows 上的 Python”。
  • 添加了 第 1.3 节 “Mac OS X 上的 Python ”。
  • 添加了 第 1.4 节 “Mac OS 9 上的 Python ”。
  • 添加了 第 1.5 节 “RedHat Linux 上的 Python ”。
  • 添加了 第 1.6 节 “Debian GNU/Linux 上的 Python ”。
  • 添加了 第 1.7 节 “从源代码安装 Python ”。
  • 添加了 第 1.9 节 “小结”。
  • 删除了序言。
  • 修正了 例 3.27 “odbchelper.py 的输出结果” 中的拼写错误。
  • 为 第 2.3 节 “文档化函数” 添加了指向 PEP 257 的链接。
  • 修正了 第 3.4.2 节 “一次赋多值” 中指向 How to Think Like a Computer Scientist 的链接。
  • 添加了 第 3.3 节 “Tuple 介绍” 中关于隐式断言 (assert) 的评注。

2003-09-28 (4.3)

  • 添加了 第 16.6 节 “动态导入模块”。
  • 添加了 第 16.7 节 “全部放在一起” (未完成)。
  • 修正了 附录 F, 关于本书 中的链接。

2003-09-17 (4.2.1)

  • 修正了主页中的链接。
  • 修复了语法高亮。

2003-09-12 (4.2)

  • 修正了 第 16.4 节 “重识列表映射”、第 16.3 节 “重识列表过滤”、第 7.2 节 “个案研究:街道地址” 和 第 10.6 节 “处理命令行参数” 中的拼写错误。感谢你,Doug。
  • 修正了 第 5.3 节 “类的定义” 中的外部链接。感谢你,Harry。
  • 修改了 第 4.5 节 “过滤列表” 结尾的措辞。感谢你,Paul。
  • 为 第 13.5 节 “负面测试 (Testing for failure)”") 添加了几句话,以强调我们正在给 assertRaises 传递一个函数,而非函数名称。感谢你,Stephen。
  • 修正了 第 8.8 节 “dialect.py 介绍” 中的拼写错误。感谢你,Wellie。
  • 修正了关于方言示例的若干链接。
  • 修正了关于罗马数字历史的外部链接。感谢世界各地的罗马数字爱好者。

2002-07-28 (4.1)

  • 添加了 第 10.3 节 “查询缓冲节点”。
  • 添加了 第 10.4 节 “查找节点的直接子节点”。
  • 添加了 第 10.5 节 “根据节点类型创建不同的处理器”。
  • 添加了 第 10.6 节 “处理命令行参数”。
  • 添加了 第 10.7 节 “全部放在一起”。
  • 添加了 第 10.8 节 “小结”。
  • 修正了 第 6.5 节 “与目录共事” 中的拼写错误。应该是 os.getcwd(),而不是 os.path.getcwd()。感谢你,Abhishek。
  • 修正了 第 3.7 节 “连接 list 与分割字符串” 中的排印错误。当在 Python IDE 中求值 (而非打印) 的时候,它会在输出的两侧加上单引号。
  • 修改了 第 4.8 节 “全部放在一起” 中的 str 示例,以使用一个用户定义的函数,因为 Python 2.2 会为内置的字典模块定义一个 doc string,从而导致原来那个示例的失效。感谢 Eric。
  • 修正了 第 9.4 节 “Unicode” 中的拼写错误,“anyway”改为“anywhere”。感谢 Frank。
  • 修正了 第 13.6 节 “完备性检测 (Testing for sanity)”") 中的拼写错误,我原把“accept”重复了一次。感谢 Ralph.
  • 修正了 第 15.3 节 “重构” 中的排印错误,C?C?C? 匹配零至三个 C,而不是四个。感谢 Ralph。
  • 重写了 例 3.9 “Slice 简写” 中对分片的解说,使之更加清晰。感谢 Petr。
  • 添加了 第 5.5 节 “探索 UserDict:一个封装类” 中的历史评注。现在 Python 2.2 支持直接子类化内置数据类型了。
  • 为 例 5.9 “定义 UserDict 类” 添加了对字典的方法 update 的解说。感谢 Petr。
  • 在 第 5.5 节 “探索 UserDict:一个封装类” 中阐明了 Python 对重载的不支持。感谢 Petr。
  • 修正了 例 8.8 “BaseHTMLProcessor 介绍” 中的排印错误。HTML 注释以两个 (而非一个) 横杠和一个括号结束。感谢 Petr。
  • 修改了 第 8.5 节 “locals 和 globals” 中关于嵌套作用域的注记。Python 2.2 已经发布了。感谢 Petr。
  • 修正了 例 8.14 “BaseHTMLProcessor.py 中的基于 dictionary 的字符串格式化”; 中的排印错误:本应该是一连串空格,我误打为一个了。感谢 Petr。
  • 添加了 第 5.5 节 “探索 UserDict:一个封装类” 的标题以标志基类。感谢 Petr。
  • 添加了 第 15.3 节 “重构” 中的标题以提示下载 unittest。感谢 Petr。
  • 修正了 例 16.6 “在当前目录运行脚本” 中的排版错误;空格被误打为了制表符;行号也没有对准。感谢 Petr。
  • 修正了 第 3.2 节 “List 介绍” 中首字母未大写的错误。应该是 TrueFalse,而非 truefalse。感谢所有指出这一点的读者。
  • 修改了 第 3.1 节 “Dictionary 介绍”、第 3.2 节 “List 介绍” 和 第 3.3 节 “Tuple 介绍” 的小节标题。“Dictionaries 101”表明这是 Dictionary 的入门教程。美国的大学往往用“101”标示无需知识背景的入门课程,但显然这仅仅是个美国传统,所以没必要让我的国际读者们费劲猜测。――当我一年半前开始写这本书时,从未想到会拥有国际读者。
  • 把样式表升级到 DocBook XSL 1.52 版。
  • 升级到 由 Michael Kay 编制的 SAXON XSLT 解析器 6.52 版。
  • 调整了样式表的相关部分。
  • 上次修订后,她答应了。婚礼明年春天举行。

2002-04-26 (4.0-2)

  • 修正了 例 4.15 “and 介绍” 中的拼写错误。
  • 修正了 例 2.4 “模块导入的搜索路径” 中的拼写错误。
  • 修复了 Windows 帮助文件 (样式表的改动引起了目录的丢失)。

2002-04-19 (4.0)

  • 扩写了 第 2.4 节 “万物皆对象”,详细介绍了导入搜索路径。
  • 修正了 例 3.7 “负的 list 索引” 中的拼写错误。感谢 Brian 的校正。
  • 重写了 第 3.2 节 “List 介绍” 中关于真值的提示。现在 Python 有单独的布尔类型了。
  • 修正了 第 5.2 节 “使用 from module import 导入模块” 中与 Java 的语法比较部分的拼写错误。感谢 Rick 的校正。
  • 添加了 第 5.5 节 “探索 UserDict:一个封装类” 中的注解,说明了子类总是重写基类。
  • 修正了 例 5.18 “修改类属性” 中的拼写错误。感谢 Kevin 的校正。
  • 添加了 第 6.1 节 “异常处理” 中的注解,说明了可以自己定义异常并触发它。感谢 Rony 的建议。
  • 修正了 例 8.17 “处理特别标记” 中的拼写错误。感谢 Rick 的校正。
  • 添加了 例 8.18 “SGMLParser” 中的注解,详细说明了返回值。感谢 Howard 的建议。
  • 在 例 10.6 “openAnything” 中,添加了 StringIO 初始化式中的 str 函数。感谢 Ganesan 的主意。
  • 添加了 第 13.3 节 “romantest.py 介绍” 中的链接,解释了为什么测试用例要放在另一个文件中。
  • 修改了 第 16.2 节 “找到路径”,用 os.path.dirname 代替了 os.path.split。感谢 Marc 的主意。
  • 添加了代码示例 (piglatin.pyparsephone.pyplural.py),为正则表达式一章作准备。
  • 更新并扩充了主页上关于 Python 的链接。

2002-01-01 (3.9)

  • 添加了 第 9.4 节 “Unicode”。
  • 添加了 第 9.5 节 “搜索元素”。
  • 添加了 第 9.6 节 “访问元素属性”。
  • 添加了 第 10.1 节 “抽象输入源”。
  • 添加了 第 10.2 节 “标准输入、输出和错误”。
  • 在 第 6.3 节 “for 循环” 中,为 for 循环示例添加了简单计数的例子 (好的用法和不好的用法)。感谢 Kevin 的主意。
  • 修正了 例 3.25 “keys, values 和 items 函数” 中的排印错误 (params.values() 的两个元素被颠倒了)。
  • 修正了 第 4.3 节 “使用 type、str、dir 和其它内置函数” 中关于 __builtin__ 模块的错误。感谢 Denis 的校正。
  • 为 第 16.2 节 “找到路径” 添加了更多的示例,展示了如何在当前目录下运行单元测试,而不必进入 regression.py 所在的目录。
  • 在 例 3.7 “负的 list 索引” 中,修改了如何由正索引得到负索引的解释。感谢 Renauld 的建议。
  • 更新了主页上 Python 的下载链接。
  • 为主页添加了指向 Bruce Eckel 的 Thinking in Python 初稿的链接。这是一本不可思议的 (也是高阶的) 书,讲述了设计模式以及如何用 Python 实现它们。

2001-11-18 (3.8)

  • 添加了 第 16.2 节 “找到路径”。
  • 添加了 第 16.3 节 “重识列表过滤”。
  • 添加了 第 16.4 节 “重识列表映射”。
  • 添加了 第 16.5 节 “数据中心思想编程”。
  • 扩充了 第 16.1 节 “概览” 中的样例输出。
  • 完成了 第 9.3 节 “XML 解析”。

2001-09-30 (3.7)

  • 添加了 第 9.2 节 “包”。
  • 添加了 第 9.3 节 “XML 解析”。
  • 把 第 9.1 节 “概览” “打扫干净”了。感谢 Matt 的建议。
  • 在 第 5.2 节 “使用 from module import 导入模块” 中,添加了关于 Java 的提示。感谢 Ori 的建议。
  • 修正了 第 4.8 节 “全部放在一起” 中的错误。我曾暗示过,在 Python 中你不能使用 is None 来判断变量是否为 null。实际上可以;而且它比 == None 快。感谢 Ori 指出错误。
  • 澄清了 第 3.2 节 “List 介绍”:我曾说 li = li + otherli.extend(other) 等价。操作结果的确相同;但 extend 更快,因为它不会创建新 list。感谢 Denis 指出。
  • 修正了 第 3.2 节 “List 介绍” 中的错误:我曾说 li += otherli = li + other 等价。实际上,它与 li.extend(other) 等价,因为它不会创建新 list。感谢 Denis 指出。
  • 修正了 第二章 第一个 Python 程序 因我的懒惰而引起的排版错误。当我写这一章时,我没有在字符串字面量的两侧加单引号。它们会被赋予特殊字体,但在这本书的一些编译版本 (如纯文本) 中这不奏效。感谢 Denis 的建议。
  • 修正了 第 2.2 节 “函数声明” 中的错误。我曾说静态类型语言总是显示地要求给出变量的数据类型;事实上并非总是如此。有些静态类型语言会在编译时根据代码确定变量类型。感谢 Tony 指出。
  • 添加了指向 西班牙文版 的链接。

2001-09-06 (3.6.4)

  • BaseHTMLProcessor 添加处理非 HTML 实体引用的代码,并在 第 8.4 节 “BaseHTMLProcessor.py 介绍” 中添加了关于它的注解。
  • 修改了 例 8.11 “globals 介绍”,使之在输出中包括 htmlentitydefs

2001-09-04 (3.6.3)

  • 修正了 第 9.1 节 “概览” 中的拼写错误。
  • 添加了指向 韩文版 的链接。

2001-08-31 (3.6.2)

  • 修正了 第 13.6 节 “完备性检测 (Testing for sanity)”") 中的排印错误 (最后一点要求列了两次)。

2001-08-31 (3.6)

  • 完成了 第八章 HTML 处理;在其末尾添加了 第 8.9 节 “全部放在一起” 和 第 8.10 节 “小结”。
  • 添加了 第 15.4 节 “后记”。
  • 在 第九章 XML 处理 开头添加了 第 9.1 节 “概览”。
  • 在 第十六章 函数编程 开头添加了 第 16.1 节 “概览”。
  • 修正了一个长期存在的 bug:第八章 HTML 处理 中的示例被错误地着色了。
  • 添加了指向 法文版 的链接。他们做对了:他们翻译了 XML 源文件,这样我的构建脚本得以重用,他们的成果就可以用六种格式发布。
  • 升级到 DocBook XSL 1.43 版的样式表。
  • 升级到 由 Michael Kay 编制的 SAXON XSLT 解析器 6.43 版。
  • 对样式表进行了大规模翻修:放弃了原来的基于表格的排版,转向层叠样式表。不幸的是, CSS 总是会出兼容性问题,所以在每个页面的首尾部分都保留的表格。编译后的 HTML 版本在 Netscape 4 看起来更糟糕了;但在大多数现代浏览器中――包括 Netscape 6、Mozilla、Internet Explorer 5、Opera 5、Konqueror 和 iCab――中表现良好。在 Lynx 中完全可读。我爱 Lynx!它是我使用的第一个浏览器。你永远不会忘记你的第一次。
  • 迁移到 Ant 平台上,以便控制进程――我现在可是在六种格式和两种语言中探险。
  • 整理了所有的下载档案;这之前我为每个平台都发布了不同的文件,因为 Python 的 zipfile 模块创建的 .zip 文件不标准,因此不能被 Mac OS 上的 Aladdin Expander 打开。但 Ant 创建的 .zip 完全标准,兼容性良好。好样的,Ant!
  • 我们把 XML 源、XSL 样式表和相关的脚本和库放在了 SourceForge。对于喜欢冒险的人们,当然有 CVS 接入。
  • 在与 GPL 调和的 Python 2.1.1 license 下重新发布了代码。感谢你,Guido;人们确实关心,而它确实要紧。

2001-06-26 (3.5)

  • 在 第 2.2 节 “函数声明” 中添加了对 强/弱/静态/动态 数据类型的注解。
  • 添加了 第 3.1 节 “Dictionary 介绍” 中关于大小写敏感的示例。
  • 在 第五章 对象和面向对象 中使用了 os.path.normcase,以兼容对大小写不敏感的糟糕的操作系统。
  • 修正了 PDF 版本中代码的缩进问题。

2001-05-31 (3.4)

  • 添加了 第 14.5 节 “roman.py, 第 5 阶段”。
  • 添加了 第 15.1 节 “处理 bugs”。
  • 添加了 第 15.2 节 “应对需求变化”。
  • 添加了 第 15.3 节 “重构”。
  • 添加了 第 15.5 节 “小结”。
  • 又修正一个样式表 bug :嵌套的 </span> 标记总是丢失。

2001-05-24 (3.3)

  • 添加了 第 13.2 节 “深入”。
  • 添加了 第 13.3 节 “romantest.py 介绍”。
  • 添加了 第 13.4 节 “正面测试 (Testing for success)”")。
  • 添加了 第 13.5 节 “负面测试 (Testing for failure)”")。
  • 添加了 第 13.6 节 “完备性检测 (Testing for sanity)”")。
  • 添加了 第 14.1 节 “roman.py, 第 1 阶段”。
  • 添加了 第 14.2 节 “roman.py, 第 2 阶段”。
  • 添加了 第 14.3 节 “roman.py, 第 3 阶段”。
  • 添加了 第 14.4 节 “roman.py, 第 4 阶段”。
  • 在兼容 Netscape/Mozilla 的强烈要求下,调整了样式表。

2001-05-03 (3.2)

  • 添加了 第 8.8 节 “dialect.py 介绍”。
  • 添加了 第 7.2 节 “个案研究:街道地址”。
  • 修正了 handle_decl 方法中的 bug:它会产生不正确的声明 (把空格加在的不该出现的地方)。
  • 修正了 CSS (2.9 介绍过) 中的 bug:背景色丢失了。

2001-04-18 (3.1)

  • BaseHTMLProcessor.py 添加处理声明的代码;现在 Python 2.1 也支持这段代码了。
  • 添加 第 8.5 节 “locals 和 globals” 中关于嵌套作用域的注解。
  • 修正了 例 8.1 “BaseHTMLProcessor.py” 中的一个隐秘的 bug:带有字符实体的属性值不会被合适地转义。
  • 对于本书中的示例,现在推荐 (并不要求) Python 2.1,因为它支持 sgmllib.py 中的声明。
  • 更新了 主页 上的链接,使其指向已经发布的 Python 2.1。
  • 给文件加上了时间戳,以帮助重发布这本书的人们。

2001-04-16 (3.0)

  • 对 第八章 HTML 处理 中的代码修正了几个小错误。
  • 主页 上添加了指向中文版的链接。

2001-04-13 (2.9)

  • 添加了 第 8.5 节 “locals 和 globals”。
  • 添加了 第 8.6 节 “基于 dictionary 的字符串格式化”。
  • 紧缩了 第八章 HTML 处理 中的代码,特别是 ChefDialectizer,以使用更少、更简单的正则表达式。
  • 修正了一个样式表 bug:它使得生成 PDF 版本时插入了不必要的空白页。
  • 修正了一个脚本 bug:它剥除了 主页 上的 DOCTYPE
  • 添加了指向 Python Cookbook](www.activestate.com/ASPN/Python/Cookbook/ "growing archive of annotated code samples") 的链接,并为 [附录 A, 进一步阅读 添加了一些链接。
  • 改用 Google 代理 http://diveintopython.org/ 的站内搜索。
  • 升级到 DocBook XSL 样式表 1.36 版――比它所宣称的麻烦多了。可能还有潜伏的 bug。

2001-03-26 (2.8)

  • 添加了 第 8.3 节 “从 HTML 文档中提取数据”。
  • 添加了 第 8.4 节 “BaseHTMLProcessor.py 介绍”。
  • 添加了 第 8.7 节 “给属性值加引号”。
  • 紧缩了 第四章 自省的威力 中的代码:使用的内置函数 callable 来代替手工检测。
  • 把 第 5.2 节 “使用 from module import 导入模块” 从 第四章 自省的威力 移到了 第五章 对象和面向对象
  • 修正了 第 5.1 节 “概览” 中的排印错误 (补回了冒号)。
  • 添加了几个额外的供下载的样例脚本。
  • 添加了 Windows Help 输出格式。

2001-03-16 (2.7)

  • 添加了 第 8.2 节 “sgmllib.py 介绍”。
  • 紧缩了 第八章 HTML 处理 中的代码。
  • 修改了 第二章 第一个 Python 程序 中的代码:用了 items 方法代替了 keys
  • 把 第 3.4.2 节 “一次赋多值” 一节移到了 第二章 第一个 Python 程序
  • 编辑了关于字符串 join 方法的评注,提供了 The Whole Python FAQ 中解释why join is a string method (为什么 join 是字符串方法) 而不是 list 方法的这一新条目。
  • 重写了 第 4.6 节 “and 和 or 的特殊性质”,强调了 andor 的基本性质;并且不再强调 and-or 技巧。
  • 把语言比较重新组织为了 note

2001-02-28 (2.6)

  • 给 PDF 和 Word 版本加入了彩色的示例文本、改进后的目录,以及缩进良好的 tipnote
  • 现在 Word 版本是正宗的 Word 格式了,与 Word 97 完全兼容。
  • 部分地解决 PDF 和纯文本版本中的特殊字符 (像 TM 符号和花括号) 错误的问题。
  • 添加了指向支持 UNIX 的 Word 版本的下载链接――有些小鬼想把它导入到 StarOffice 或其它什么环境中去。
  • 修正了几个丢失标题的 注记
  • 修正了一个 bug:它会导致 Internet Explorer 5 for Mac OS 示例中的彩色文字发生字体错乱。(你好?!?Microsoft?好,你倒说说看,到底是 <pre> 的哪一部分你不懂?)
  • 修复了 Mac OS 档案的下载链接。
  • 在每章的第一个示例程序前,都添加了下载示例程序的链接。(我的日志显示人们往往会跳过本可以下载它们的那两个页面 (即: 主页 和序言),然后在阅读时惊慌失措地寻找下载地址。)
  • 进一步紧缩了 主页 和序言――但愿人们不会再因为其杂乱不堪而跳过它们。
  • 但愿早点结束这没完没了的调试,回到写作正轨。

2001-02-23 (2.5)

  • 添加了 第 6.4 节 “使用 sys.modules”。
  • 添加了 第 6.5 节 “与目录共事”。
  • 把 例 6.17 “分割路径名” 从 第 3.4.2 节 “一次赋多值” 移到了 第 6.5 节 “与目录共事”。
  • 添加了 第 6.6 节 “全部放在一起”。
  • 添加了 第 5.10 节 “小结”。
  • 添加了 第 8.1 节 “概览”。
  • 修正了 例 6.10 “遍历 dictionary” 中的程序清单――少了一个冒号。

2001-02-12 (2.4.1)

  • 修改了新闻组链接,使用了 “news:” 协议。deja.com 已死。
  • 在下载链接旁标明了文件大小。

2001-02-12 (2.4)

  • 为大多数章节添加了 “进一步阅读”,并在 附录 A, 进一步阅读 中汇总。
  • 在纯文本格式的外部链接旁添加了 URL 地址。

2001-02-09 (2.3)

  • 重写了 第五章 对象和面向对象 中的部分代码,使用了类的属性,并给出了一个更好的多值赋值的例子。
  • 重新组织了 第五章 对象和面向对象,把类的部分提前了。
  • 添加了 第 5.8 节 “类属性介绍”。
  • 添加了 第 6.1 节 “异常处理”。
  • 添加了 第 6.2 节 “与文件对象共事”。
  • 把 第五章 对象和面向对象 中的 “回顾” 部分合并到了 第 5.1 节 “概览” 中。
  • 给所有的程序清单和示例选择了配色方案。
  • 修正了 第 2.2 节 “函数声明” 中的重大错误:函数会隐式地返回一个 None,所以你 可以 在不触发异常的前提下把它的返回值赋给一个变量。
  • 扩写了 第 2.3 节 “文档化函数”、第 2.4 节 “万物皆对象” 和 第 3.4 节 “变量声明”,使之更加清晰。

2001-02-02 (2.2)

  • 编辑了 第 4.4 节 “通过 getattr 获取对象引用”。
  • xref 标记添加了标题,所以它们也能显示可爱的提示框了。
  • 修改了修订历史页面的主题风格。
  • 修正了我昨天在我的 HTML 中提到的 bug:后期处理脚本将会导致无效的 HTML 字符引用,甚至让一些浏览器无法显示。
  • 升级到 DocBook XSL 样式表 1.29 版。

2001-02-01 (2.1)

  • 重写了 第四章 自省的威力 中的示例代码,用 getattr 代替了 execeval,并重写了相应的解释文字。
  • 在 第 3.2 节 “List 介绍” 中添加了列表操作的示例。
  • 在章节末尾的小节部分 (第 3.8 节 “小结” 和 第 4.9 节 “小结”) 添加了指向相关内容的链接。

2001-01-31 (2.0)

  • 把 第 5.6 节 “专用类方法” 分成了三节: 第 5.5 节 “探索 UserDict:一个封装类”、第 5.6 节 “专用类方法” 和 第 5.7 节 “高级专用类方法”。
  • 修改了关于 垃圾收集 的注解以指出 Python 2.0 及其后续版本自动处理循环引用,无需手工编码。
  • 修复了 UNIX 下载,使之包括了所有相关文件。

2001-01-15 (1.9)

  • 删除了 第二章 第一个 Python 程序 的概论。
  • 删除了 第四章 自省的威力 的概论。
  • 删除了 第五章 对象和面向对象 的概论。
  • 大刀阔斧地改动文本。我似乎总是跑题。

2001-01-12 (1.8)

  • 为 第 3.4.2 节 “一次赋多值” 添加了更多示例。
  • 添加了 第 5.3 节 “类的定义”。
  • 添加了 第 5.4 节 “类的实例化”。
  • 添加了 第 5.6 节 “专用类方法”。
  • 一些小的样式表调整,包括为 link 标记添加了标题。要是你的浏览器够酷的话,它会用一个可爱的提示框显示链接目标的描述。

2001-01-03 (1.71)

  • 对样式表进行了几处修改,提高了对浏览器的兼容性。

2001-01-02 (1.7)

  • 添加了 第二章 第一个 Python 程序 的概览。
  • 添加了 第四章 自省的威力 的概览。
  • 添加了 第五章 对象和面向对象 的小结部分[后来删除了]。
  • 添加了 第 5.9 节 “私有函数”。
  • 添加了 第 6.3 节 “for 循环”。
  • 添加了 第 3.4.2 节 “一次赋多值”。
  • 编写了把书输出为单个 HTML 文件、PDF、Microsoft Word 97 和纯文本的脚本。
  • 注册了域名 diveintopython.org 并把书――在线的和离线的――都移到了那里。
  • 修改了 XSL 样式表,以修改在每个页面首尾显示的导航链接。页首加上了域名、版本号,以及跳到章目录、总目录和主页的快速链接。

2000-12-11 (1.6)

  • 添加了 第 4.8 节 “全部放在一起”。
  • 完成了 第四章 自省的威力:在结尾添加了 第 4.9 节 “小结”。
  • 在 第五章 对象和面向对象 的开头添加了 第 5.1 节 “概览”。

2000-11-22 (1.5)

  • 添加了 第 4.6 节 “and 和 or 的特殊性质”。
  • 添加了 第 4.7 节 “使用 lambda 函数”。
  • 添加了附录 五分钟回顾。
  • 添加了附录 技巧和窍门。
  • 添加了附录 示例清单。
  • 添加了附录 修订历史。
  • 扩写了 第 3.6 节 “映射 list” 中映射列表的示例。
  • 把更多的常用术语加入了 XML 实体。
  • 升级到 DocBook XSL 样式表 1.25 版。

2000-11-14 (1.4)

  • 添加了 第 4.5 节 “过滤列表”。
  • 为 第 4.3 节 “使用 type、str、dir 和其它内置函数” 添加了 dir 文档。
  • 在 第 3.3 节 “Tuple 介绍” 中,添加了 in 的示例。
  • 添加了 MacPython 环境下 if __name__ 技巧的额外说明。
  • 转向了 由 Michael Kay 编制的 SAXON XSLT 解析器。
  • 升级到 DocBook XSL 样式表 1.24 版。
  • 添加了 db-html 处理的说明:在每个章、节中都加上了显示的文件名,避免在添加或重排节时导致深层链接实效。
  • 把一些常用术语加入了 XML 实体。
  • 把几个 literal 标记改为了 constant

2000-11-09 (1.3)

  • 添加了关于动态代码执行的部分。
  • 在所有有必要的地方,都添加了对本书其它部分的引用链接。
  • 扩写了 第二章概览,解释了这个函数的实际作用。
  • 显示地声明示例代码是在 GNU General Public License 下发布的;添加了该 License 的附录。 [Note 8/16/2001:代码在与 GPL 调和的 Python license 下重新发布了。]
  • 修改了链接,以使用 xref 标记――我弄明白怎么使用了这个标记了。

2000-11-06 (1.2)

  • 添加了第二章的前四部分。
  • 进一步紧缩了了序言,并添加了指向 Python 的 Mac OS 版本的链接。
  • 扩写了“映射列表”和“连接字符串”中的示例,使其更富逻辑性。
  • 添加了第一章小结中的输出。

2000-10-31 (1.1)

  • 完成了第一章关于映射、连接的部分,以及整章小结。
  • 在序言使用了较缓和的措辞,并添加了针对非程序员的入门教程的链接。
  • 修正了几处拼写错误。

2000-10-30 (1.0)

  • 原始发布

附录 F. 关于本书

本书的英文版是用 EmacsDocBook XML 格式写成的, 使用 由 Norman Walsh 编制的 XSL 样式表 的经过客户化的版本由 由 Michael Kay 编制的 SAXON XSLT 解析器 转化为 HTML。在此基础上, 使用 HTMLDoc 将其转化为 PDF; 使用 w3m 将其转化为无格式文本 (plain text)。(本书的简体中文版是使用译者习惯使用的编辑器对 XML 源代码进行翻译, 并使用原书作者提供的创建脚本输出了 html 版和 htmlflat 版,使用 HTML Help Workshop 生成了 chm 版本。)程序清单和例子使用了由 Just van Rossum 编写的 pyfontify.py 程序的改进版本进行了语法着色, 此程序包含在示例脚本中。

如果您对学习用 DocBook 进行技术方面的写作感兴趣, 可以 下载本书的 XML 源代码创建脚本, 它包含了用于创建本书各种输出格式的经过客户化的 XSL 样式表。您还应该阅读权威著作, DocBook: The Definitive Guide。如果您打算用 DocBook 进行任何正式的写作, 我建议您订阅 DocBook 邮件列表

附录 G. GNU Free Documentation License

  • G.0. Preamble
  • G.1. Applicability and definitions
  • G.2. Verbatim copying
  • G.3. Copying in quantity
  • G.4. Modifications
  • G.5. Combining documents
  • G.6. Collections of documents
  • G.7. Aggregation with independent works
  • G.8. Translation
  • G.9. Termination
  • G.10. Future revisions of this license
  • G.11. How to use this License for your documents

Version 1.1, March 2000

Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

G.0. Preamble

The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

G.1. Applicability and definitions

This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you".

A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License.

The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

G.2. Verbatim copying

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

G.3. Copying in quantity

If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

G.4. Modifications

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

  1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
  2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five).
  3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
  4. Preserve all the copyright notices of the Document.
  5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
  6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
  7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
  8. Include an unaltered copy of this License.
  9. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
  10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
  11. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
  12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
  13. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version.
  14. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

G.5. Combining documents

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements."

G.6. Collections of documents

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

G.7. Aggregation with independent works

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate.

G.8. Translation

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail.

G.9. Termination

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

G.10. Future revisions of this license

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.

G.11. How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".

If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

附录 H. GNU 自由文档协议

附录 H. GNU 自由文档协议

  • H.0. 序
  • H.1. 适用范围和定义
  • H.2. 原样复制
  • H.3. 大量复制
  • H.4. 修改
  • H.5. 合并文档
  • H.6. 文档合集
  • H.7. 独立著作聚集
  • H.8. 翻译
  • H.9. 终止协议
  • H.10. 协议将来的修订
  • H.11. 如何为你的文档使用本协议

1.1 版, 2000 年 5 月

copyright (C) 2000 Free Software Foundation, Inc.

59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

任何人都可以复制和发行这一协议文档的原始副本,但不允许对它进行修改。

This is an unofficial translation of the GNU Free Documentation License (GFDL) into Chinese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for works that uses the GFDL --only the original English text of the GFDL does that. However, I hope that this translation will help Chinese speakers understand the GFDL better.

这是 GNU 自由文档协议的非官方中文翻译。它不由自由软件基金会出版,因此不代表使用 GFDL 的著作的法律合同――只有 GFDL 的英文原文具有此效力。然而我们希望此翻译有助于说中文的人更好地理解 GFDL 。

H.0. 序

H.0. 序

本协议的目的在于保证一本手册、教程,或其它任何书面文档在如下意义上的“自由”:确保任何人复制、重发行它的自由,不论是否经过修改,不论是否出于商业目的;其次,这一协议保护文档的作者和出版者的信誉不受他人修改的影响。

本协议是一种“copyleft”,这意味着:文档的派生物和文档本身必须遵循同种意义上的自由。本协议是对 GNU 通用公共协议的补充,后者是为自由软件撰写的“copyleft”协议。

我们撰写这一协议的最初目的是用于自由软件的手册,因为自由软件需要自由文档:自由软件应当带有同样自由的文档。但这一协议的适用范围不局限于软件文档;任何书面著作都可以使用本协议,不论它涉及哪一主题,不论它是否会出版为纸质书籍。我们建议那些以指导或参考为目的的文档作品使用本协议。

H.1. 适用范围和定义

H.1. 适用范围和定义

本协议适用于任何手册或者其它著作,只要版权人声明了以本协议发行。下文所说的“文档”是指任何此类手册或著作。任何公众成员都是协议的受益者,我们将用“你”来称呼。

文档的“修改版”(Modified Version) 指任何包括文档或其一部分的著作,不论是原样复制的,还是加入了修改和/或翻译。

“附属部分” (Secondary Section) 指文档中指定的附录或序言部分,用于专门叙述作者或出版者与文档主题 (或其相关事项) 之间的关系,不包含该主题内的任何具体内容。(例如,如果文档是数学教材的一部分,那么附属部分可能不会讲述任何数学知识。)上面所说的关系可能是与文档主题 (或其相关事项) 之间的历史关联,或对它的法律、商业、哲学、伦理或政治观点。

“不变部分”(Invariant Sections) 是“附属部分”的一个特定子集,由使用本协议的声明根据其标题指定。

“封面文本”(Cover Texts) 是特定的短篇文字,在使用本协议的声明中列为“前封面文本”或“封底文本”。

文档的“透明”(Transparent) 副本指这样的副本:可以由机器阅读;其格式标准是公众可得的,其内容可以用一般的文本编辑器,或 (对于像素图象) 一般的绘图程序 ,或 (对于绘画作品) 广泛使用的图象编辑器直接打开查看和编辑;能直接输入文本格式器,或可自动化翻译为多种能输入文本格式器的格式。如果某一副本以非透明文件格式制作,后者的目的在于阻挠或不鼓励读者进行后期的修改,则该副本不是透明的,即“非透明”(Opaque) 的。

透明副本应当采用的合适格式的例子:不带标记的纯 ASCII 文本、Texinfo 输入格式、LaTeX 输入格式、采用公众可得的 DTD 的 SGML 或 XML,以及遵循标准的简单的为人类修改所设计的 HTML。非透明的格式包括 PostScript、PDF、只能被专有文字处理器阅读和编辑的专有格式、采用公众不可得的 DTD 和/或处理工具的 SGML 或 XML、机器生成的,仅被一些文字处理器用于输出的 HTML。

“扉页”(Title Page)指的是――对于纸版书来说――扉页本身,加上本协议要求出现在扉页中的材料所在的页面。对那些格式上没有此类扉页的作品,“扉页”指的是出现在作品最显著标题附近,正文前的文字。

H.2. 原样复制

H.2. 原样复制

你可以以任何媒介复制和发行文档――不论是否出于商业目的――只要在每个副本中包含本协议、版权声明和采用本协议的声明,同时不给本协议附加任何其它条件。你不能使用技术手段妨碍或控制你所制作或发行的副本的阅读和继续复制。然而,你可以为你的复制接受偿金。如果你发行了大量的副本,你还要遵循第三部分中的条件。

你也可以借出副本――条件和上面所说的相同――还可以公开展示。

H.3. 大量复制

H.3. 大量复制

如果你出版的印刷的文档副本数超过 100,而且文档的协议声明要求包括封面文本,你必须为每份副本都装上包含清楚易认的封面文本的封面:前封面文本放在前封面,封底文本放在封底。两个封面都必须清楚易认地指出你是这些副本的出版者。前封面必须印上完整的标题,每个单词都同样显著和易认。你可以在封面上添加其它内容。如果某一复制的改动仅限于封面,且保留了原有标题并符合上述条件,那么在其它方面就可以被认为是原样复制。

如果要求包括的封面文本 (前封面的或封底的) 过于冗长以致不能满足易认的属性,你应当把列在前面的内容 (数量尽量合适地) 放在封面上,余下的内容放在后续页面上。

如果你出版或发行的非透明文档的副本数超过 100,你必须或者为每个非透明副本附带一份可机读的透明副本;或者在每个非透明副本内,或附带副本指出一个公众可进入的计算机网络地址,后者包含了一份完整的不带附加材料的透明文档副本,一般的网络使用者使用公共标准的网络接口,无需付费即可匿名下载。如果你选用了后一种办法,你必须在开始发行非透明副本时采取一些谨慎的措施,以确保处在你所指明的地址的透明副本在你发行最后一本副本 (不论是直接发行的,还是通过代理商或零售商发行的) 后至少一年内仍然可用。

请求,但不强制要求,你在重发行大量副本之前联系文档的作者,以便他们能给你提供文档的更新版本。

H.4. 修改

H.4. 修改

满足了第 2 和第三部分中的要求,你就可以复制和发行文档的修改版,其前提是你精确地把修改版以本协议发布,此时修改版就扮演了文档的角色,本协议所规定的发行和修改条款就对修改版的持有者有效。此外你必须对修改版做到:

  1. 在扉页 (以及封面,如果有的话) 上使用和文档不同的标题,同时也和上一版本不同 (上一版本应当被列在文档的历史部分中,如果有的话)。如果得到了上一版本的出版者的许可,你也可以使用同上版本相同的标题。
  2. 在扉页上列出一个或多个为修改版的著作权负责的作者,并列出至少五个主要作者 (如果不足五个则列出所有作者)。
  3. 在扉页上指出修改版的出版者,并以其作为书的出版者。
  4. 保留文档的所有版权声明。
  5. 在其它版权声明旁边,添加上合适的针对你的修改的版权声明。
  6. 在版权声明和后面紧接着包括一段协议声明,允许以本协议使用修改版,其格式如附录中所示。
  7. 完整地保留文档的协议声明中给出的不变部分和要求包括的封面文本。
  8. 包含本协议的一份未经改动的副本。
  9. 保留“历史”部分及其标题,并为其添加一项,至少包括扉页中所指出的标题、年份、新作者和出版者。如果文档中没有标题为“历史”的部分,创建一个,声明文档的扉页中所指出的标题、年份、作者和出版者,再添加一项,以描述修改版,正如上文所述。
  10. 保留文档中给出的用以获取文档的透明副本的网络地址――如果有的话;同样包括修改版所基于的前一版本所给出的地址。这些都可以放在“历史”部分里面。如果著作是在文档本身至少四年前出版的,或者该版本的原出版者允许,你可以略去它的地址。
  11. 保留原文档中的“鸣谢”或“贡献”部分的标题,以及其中给予每一个贡献者的鸣谢和/或献辞的要旨和语气。
  12. 保留文档的所有不变部分,文字和标题均不能改动。章节号或其等价物不被视为章节标题的一部分。
  13. 删除所有题为“赞誉”的章节。这样的章节不能包括在修改版中。
  14. 不要把任何已有章节题为“赞誉”,或与不变部分中的标题冲突。

如果修改版包括新的序言或附录,且满足附属部分的条件,不包含从文档中复制的材料,你可以 (也可以不) 把它们的一部分或全体指定为不变的。要做到这一点,需要把它们的标题添加到修改版的协议声明的不变部分列表中。这些标题必须和其它章节标题不同。

你可以添加题为“赞誉”的一个章节,只要它只包括不同群体对你的修改版的赞誉――例如,同类作品的对比,或者你的文字已被某个组织或官方机构批准为某个标准的定义的原文。

你可以在修改版封面文本的最后添加一小段――最多五个单词――作为前封面文本,另一小段――最多 25 个单词――作为封底文本。一个实体只能添加 (或整理出) 前封面文本的一段和封底文本的一段。如果文档的某一封面已经包括了你或你所代表的同一个实体之前所添加 (或整理出) 的一段封面文本,你不能再往这一封面上添加;但你可以替换掉旧的文本,只要得到了添加该文本的出版者的明确许可。

文档的作者和出版者使用本协议,并不连同给予此许可:公开使用他们的名字来确保或暗示对修改版的肯定。

H.5. 合并文档

H.5. 合并文档

你可以把文档以及其它以本协议发布的文档合并起来,前提是符合第四部分中关于修改版的条件,并在合并作品中不经修改地包含所有原文档的所有不变部分,并在合并作品的协议声明中把它们全部列为不变部分。

合并作品只需包含本协议的一份副本,重复的不变部分可以合并为一个。如果几个不变部分的标题相同而内容不同,则应在标题的末尾添加其原作者或出版者的名字 (用括号括起来)――如果是已知的――来区分,否则就用一个独有的数字来区分。对合并作品的协议声明的不变部分列表中出现的章节标题作同样的调整。

合并时,你必须把各个原文档的“历史”部分合并为一个“历史”部分;对任何题为“鸣谢”和“献辞”的部分作同样的合并。你必须删除所有题为“赞誉”的部分。

H.6. 文档合集

H.6. 文档合集

你可以把文档以及其它以本协议发布的文档合为一集,把分立的本协议的副本合为一个包含在合集中,前提是对每个文档的其它所有方面,都应遵循本协议关于原样复制的规定。

你可以从这样的合集中抽取出一个文档,并以本协议单独发行,前提是你把本协议的副本插入到了抽取出的文档中,并在其它所有方面,都应遵循本协议关于原样复制的规定。

H.7. 独立著作聚集

H.7. 独立著作聚集

文档或其派生物与其它分立文档或著作的汇编,以一个文库或一个大媒体的形式发行,如果其自身没有汇编版权声明,其整体不被视为文档的修改版。这样的汇编称为“聚集”,本协议不约束和文档汇编在一起的其它非派生作品。

如果第三部分中关于封面文本的要求对于这些 (聚集中的) 文档副本是可行的,但文档只占聚集的不到 1/4 的部分,那么文档的封面文本可以被置于聚集内部,只围绕在文档自身周围。否则,它们必须出现在聚集的封面上。

H.8. 翻译

H.8. 翻译

翻译被认为是修改的一种,所以你可以依据第 4 分部分发行文档的翻译版。把不变部分替换为翻译版本需要得到版权持有者的特别许可,但你可以包括部分或全部不变部分的翻译版本作为补充。你也可以包括本协议的一份翻译,但同时也要包括本协议的英语版本。如果翻译版本和英语原版有任何出入,当以英语原版为准。

H.9. 终止协议

H.9. 终止协议

你只能在明确遵循本协议的前提下,对文档进行复制、修改、派生协议或发行。其它任何任何复制、修改、派生协议或发行的企图都是无效的,并会自动终止本协议授予你的权力。然而如果你违反了本协议,那些根据此协议从你处接受了副本或者权力的人们,只要遵循本协议,他们的协议将不会被终止。

H.10. 协议将来的修订

H.10. 协议将来的修订

自由软件基金会可能会不时出版 GNU 自由文档协议的新的、修订过的版本。这样的新版本在其精神上会与这一版本相似,但为对付新的问题或利害关系,在细节上可能会有所不同。参看 www.gnu.org/copyleft/

协议的每一版本都会被赋予一个以示区别的版本号。如果文档指定和本协议的版本号加上“或者更新的版本”,你可以遵循指定的版本和自由软件基金会出版的新版本 (不包括草稿) 中的任意一个。如果文档没有指定版本号,你可以从自由软件基金会曾经出版过的版本 (不包括草稿) 中任选一个。

H.11. 如何为你的文档使用本协议

H.11. 如何为你的文档使用本协议

要为你所写的文档使用本协议,在文档中包括本协议的一份副本,并把如下版权和协议声明放在扉页后:

Copyright (c) YEAR YOUR NAME.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".

参考译文:

Copyright (c) YEAR YOUR NAME.

允许在 GNU 自由文档协议 (1.1 版,或自由软件基金会出版的任何更新版本) 的许可下复制、发行且/或修改本文档;本文档的不变部分包括[它们的标题列在这里],前封面文本是[列在这里],封底文本是[列在这里]。该协议的一份副本包含在题为“GNU Free Documentation License”的章节中。

如果没有不变部分,就写“with no Invariant Sections”(没有不变部分) 而不是指明不变部分;如果没有前封面文本,就写“no Front-Cover Texts”(没有前封面文本) 而不是“Front-Cover Texts being LIST”(前封面文本是[列在这里]);封底文本也是一样。

如果你的文档包含有价值的样例程序代码,我们建议你把这些样例用平行的自由软件协议发布,以使得它们可以在自由软件中被使用,例如 GNU 通用公共协议。

附录 I. Python license

  • I.A. History of the software
  • I.B. Terms and conditions for accessing or otherwise using Python
    • I.B.1. PSF license agreement
    • I.B.2. BeOpen Python open source license agreement version 1
    • I.B.3. CNRI open source GPL-compatible license agreement
    • I.B.4. CWI permissions statement and disclaimer

I.A. History of the software

Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI) in the Netherlands as a successor of a language called ABC. Guido is Python's principal author, although it includes many contributions from others. The last version released from CWI was Python 1.2. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI) in Reston, Virginia where he released several versions of the software. Python 1.6 was the last of the versions released by CNRI. In 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. Python 2.0 was the first and only release from BeOpen.com.

Following the release of Python 1.6, and after Guido van Rossum left CNRI to work with commercial software developers, it became clear that the ability to use Python with software available under the GNU Public License (GPL) was very desirable. CNRI and the Free Software Foundation (FSF) interacted to develop enabling wording changes to the Python license. Python 1.6.1 is essentially the same as Python 1.6, with a few minor bug fixes, and with a different license that enables later versions to be GPL-compatible. Python 2.1 is a derivative work of Python 1.6.1, as well as of Python 2.0.

After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined Digital Creations. All intellectual property added from this point on, starting with Python 2.1 and its alpha and beta releases, is owned by the Python Software Foundation (PSF), a non-profit modeled after the Apache Software Foundation. See www.python.org/psf/ for more information about the PSF.

Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible.

I.B. Terms and conditions for accessing or otherwise using Python

  • I.B.1. PSF license agreement
  • I.B.2. BeOpen Python open source license agreement version 1
  • I.B.3. CNRI open source GPL-compatible license agreement
  • I.B.4. CWI permissions statement and disclaimer

I.B.1. PSF license agreement

  1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 2.1.1 software in source or binary form and its associated documentation.
  2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 2.1.1 alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001 Python Software Foundation; All Rights Reserved" are retained in Python 2.1.1 alone or in any derivative version prepared by Licensee.
  3. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.1.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 2.1.1.
  4. PSF is making Python 2.1.1 available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
  5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
  7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
  8. By copying, installing or otherwise using Python 2.1.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.

I.B.2. BeOpen Python open source license agreement version 1

  1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software").
  2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee.
  3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
  4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  5. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
  6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page.
  7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement.

I.B.3. CNRI open source GPL-compatible license agreement

  1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation.
  2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: hdl.handle.net/1895.22/1013".
  3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1.
  4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
  5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
  7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
  8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.

I.B.4. CWI permissions statement and disclaimer

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

附录 J. Python 协议

附录 J. Python 协议

  • J.0. 关于译文的声明
  • J.A. 软件的历史
  • J.B. 使用 Python 的条款和条件
  • J.B.1. PSF 协议
  • J.B.2. BeOpen Python 开源协议第 1 版
  • J.B.3. CNRI 开源 GPL 兼容协议
  • J.B.4. CWI 许可声明与免责声明

J.0. 关于译文的声明

J.0. 关于译文的声明

本译文仅供参考,不代表 Python 协议本身。它不具备任何法律效力――只有 Python 协议的英文原文具有此效力。

J.A. 软件的历史

J.A. 软件的历史

Python 是 Guido van Rossum 于 20 世纪 90 年代早期在荷兰的 Stichting Mathematisch Centrum (CWI) 发明的,作为一门叫 ABC 的语言的后继。Guido 是 Python 的主要作者,尽管它包括了很多他人的贡献。CWI 发布的最后版本是 Python 1.2。1995 年,Guido 在 Reston,Virginia 的 Corporation for National Research Initiatives (CNRI) 继续进行 Python 的工作,他在此又发布了这个软件的多个版本。Python 1.6 是 CNRI 发布的最后版本。2000 年,Guido 和 Python 的核心团队转移到了 BeOpen.com,形成了 BeOpen PythonLabs 团队。Python 2.0 第一个也是唯一一个 BeOpen.com 发布的版本。

Python 1.6 发布后,Guido van Rossum 离开了 CNRI,同商业软件开发员一同工作。让 Python 和以 GNU Public License (GPL) 发布的软件一起工作的需求逐渐明朗起来。CNRI 和自由软件基金会 (Free Software Foundation, FSF) 进行了接触,得到对 Python 协议改动措辞的许可。Python 1.6.1 本质上与 Python 1.6 是相同的,只修正了小部分 bug,但却是用不同的协议发布,从而后续的版本都兼容 GPL 了。Python 2.1 是 Python 1.6.1 的衍生物,Python 2.0 也是。

Python 2.0 在 BeOpen.com 发布后,Guido van Rossum 和其它的 PythonLabs 开发者加入了 Digital Creations。从 Python 2.1 及其 alpha 和 beta 发布开始,此后加入的所有知识产权都由 Python 软件基金会 (Python Software Foundation, PSF) 所有,后者是一个非盈利的组织,以 Apache 软件基金会为样板。关于 PSF 的更多信息可以参看 www.python.org/psf/。

感谢成千上万的外部志愿者,他们在 Guido 的指引下使得所有这些发布成为可能。

J.B. 使用 Python 的条款和条件

J.B. 使用 Python 的条款和条件

  • J.B.1. PSF 协议
  • J.B.2. BeOpen Python 开源协议第 1 版
  • J.B.3. CNRI 开源 GPL 兼容协议
  • J.B.4. CWI 许可声明与免责声明

J.B.1. PSF 协议

  1. 本协议是 Python 软件基金会 (“PSF”) 同使用 Python 2.1.1 软件――源码或二进制形式――及其相关文档的个人或组织 (“获许者”) 之间达成的契约。
  2. 在服从本协议的条款和条件的前提下,PSF 特此给予获许者无例外、无版税、全球的许可,以复制、分析、测试、运行和/或公开展出、衍生、发行,或以其它方式使用单独的 Python 2.1.1 或其衍生版本,前提是 PSF 的协议和 PSF 的版权声明 (“Copyright (c) 2001 Python Software Foundation; All Rights Reserved”) 保留在单独的 Python 2.1.1 或其由获许者特制的衍生版本中。
  3. 如果获许者制作了一基于或包括 Python 2.1.1 或其一部分的衍生物,同时想要使其能为他人所得,本协议特此同意在其中包含关于对 Python 2.1.1 所作改动的简短概要。
  4. PSF 使获许者能够使用 Python 2.1.1,其基础是“AS IS”原则。PSF 不作任何描述或保证,不论是明确的还是暗含的。例如――但决不限于此――PSF 不作并且否认如下描述或保证:产品的销路,产品是否适合于某一用途,以及 Python 2.1.1 不会侵犯任何第三方的权力。
  5. PSF 将不对获许者或其它任何 Python 2.1.1 的用户,为修改、发行或者以其它方式使用 Python 2.1.1 或其衍生物所引起的任何意外的、特殊的,或直接的损害或丢失负担任何责任,即使对此种可能性知情。
  6. 一旦协议的条款和条件遭到实质性的破坏,本协议将自动终止。
  7. 协议中的任何内容都不视为要在 PSF 和获许者之间创造代理、合作或者合资的关系。本协议不授予此许可:使用 PSF 商标,或在商标中以商标的意义使用其商标名,以赞誉或宣扬获许者或任何第三方的产品或服务。
  8. 通过复制、安装,或以其它方式使用 Python 2.1.1,获许者同意受到本协议的条款和条件的约束。

J.B.2. BeOpen Python 开源协议第 1 版

  1. 本协议是 BeOpen.com (“BeOpen”,其办公室位于 160 Saratoga Avenue, Santa Clara, CA 95051) 同使用本软件――源码或二进制形式――及其相关文档 (“本软件”) 的个人或组织 (“获许者”) 之间达成的契约。
  2. 在服从 BeOpen Python 协议的前提下,BeOpen 特此给予获许者无例外、无版税、全球的许可,以复制、分析、测试、运行和/或公开展出、衍生、发行,或以其它方式使用单独的本软件或其衍生版本,前提是 BeOpen Python 保留在单独的本软件或其由获许者特制的衍生版本中。
  3. BeOpen 使获许者能够使用本软件,其基础是“AS IS”原则。BeOpen 不作任何描述或保证,不论是明确的还是暗含的。例如――但决不限于此――BeOpen 不作并且否认如下描述或保证:产品的销路,产品是否适合于某一用途,以及本软件不会侵犯任何第三方的权力。
  4. PSF 将不对获许者或其它任何本软件的用户,为修改、发行或者以其它方式使用本软件或其衍生物所引起的任何意外的、特殊的,或直接的损害或丢失负担任何责任,即使对此种可能性知情。
  5. 一旦协议的条款和条件遭到实质性的破坏,本协议将自动终止。
  6. 本协议应当受到 California 州法律的管理和解释,除非法律条款发生了矛盾。协议中的任何内容都不视为要在 BeOpen 和获许者之间创造代理、合作或者合资的关系。本协议不授予此许可:使用 BeOpen 商标,或在商标中以商标的意义使用其商标名,以赞誉或宣扬获许者或任何第三方的产品或服务。作为例外,出现在 www.pythonlabs.com/logos.html 的“BeOpen Python”标志可以按照该网页上所授予的许可使用。
  7. 通过复制、安装,或以其它方式使用本软件,获许者同意受到本协议的条款和条件的约束。

J.B.3. CNRI 开源 GPL 兼容协议

  1. 本协议是 Corporation for National Research Initiatives (“CNRI”,其办公室位于 1895 Preston White Drive, Reston, VA 20191) 同使用 Python 1.6.1――源码或二进制形式――及其相关文档的个人或组织之间达成的契约。
  2. 在服从本协议的条款和条件的前提下,CNRI 特此给予获许者无例外、无版税、全球的许可,以复制、分析、测试、运行和/或公开展出、衍生、发行,或以其它方式使用单独的 Python 1.6.1 或其衍生版本,前提是 CNRI 的协议和 CNRI 的版权声明 (“Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved”) 保留在单独的 Python 1.6.1 或其由获许者特制的衍生版本中。作为替代,在应当出现 CNRI 协议之处,获许者可以用下列文本加以替代:(不含引号):“Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: [hdl.handle.net/1895.22/1013”(Python](hdl.handle.net/1895.22/101… 1.6.1 必须在服从 CNRI 的协议的前提下方可使用。这一协议和 Python 1.6.1 一起,用一个唯一的、不变的标识符 (也叫标识句柄) 即可在 Internet 上找到:1895.22/1013。这一协议可以通过代理服务器从 Internet 上得到,通过访问如下 URL:hdl.handle.net/1895.22/1013)。。)
  3. 如果获许者制作了一基于或包括 Python 1.6.1 或其一部分的衍生物,同时想要使其能为他人所得,本协议特此同意在其中包含关于对 Python 1.6.1 所作改动的简短概要。
  4. CNRI 使获许者能够使用 1.6.1,其基础是“AS IS”原则。CNRI 不作任何描述或保证,不论是明确的还是暗含的。例如――但决不限于此――CNRI 不作并且否认如下描述或保证:产品的销路,产品是否适合于某一用途,以及 Python 1.6.1 不会侵犯任何第三方的权力。
  5. CNRI 将不对获许者或其它任何 Python 1.6.1 的用户,为修改、发行或者以其它方式使用 Python 1.6.1 或其衍生物所引起的任何意外的、特殊的,或直接的损害或丢失负担任何责任,即使对此种可能性知情。
  6. 一旦协议的条款和条件遭到实质性的破坏,本协议将自动终止。
  7. 本协议应当受到美国联邦知识产权法律的管理,包括但不限于联邦版权法――或者,在联邦法律不起作用的地方,如 Virginia 州,由 Commonwealth of Virginia 制定的法律,除非其条款发生了矛盾。尽管如前所述,考虑到基于 Python 1.6.1 的包含不可分割的以 GNU 通用公共协议 (GPL) 发布的材料的衍生物,由 Commonwealth of Virginia 制定的法律只管理使用本协议时与第 4、5、7 章中的内容有关的事项。协议中的任何内容都不视为要在 CNRI 和获许者之间创造代理、合作或者合资的关系。本协议不授予此许可:使用 CNRI 商标,或在商标中以商标的意义使用其商标名,以赞誉或宣扬获许者或任何第三方的产品或服务。
  8. 通过单击标示出“接受”的按钮、或者复制、安装,或以其它方式使用 Python 1.6.1,获许者同意受到本协议的条款和条件的约束。

J.B.4. CWI 许可声明与免责声明

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.

在此特许以任何目的、不付费地使用、复制、修改和发行本软件及其文档,其前提是上述版权声明出现在所有的副本中,版权声明和此许可声明出现在支持文档中。在未经书面特许,Stichting Mathematisch Centrum 或 CWI 的名字不被用于广告或软件发行的相关宣传事宜。

Stichting Mathematisch Centrum 否认所有对此软件的保证,包括所有暗含的对产品的销路、是否适合于某一用途的保证。无论如何,Stichting Mathematisch Centrum 都不为任何意外的、间接的,或直接的损害或由任何由使用权、数据或利益的损失所造成的损害负担任何责任,不论是否达成了合同,还是由于疏忽大意或者其它的侵权行为,不论和使用或运行本软件是否有关。