- 第 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.8. 使用 Python 的交互 Shell
- 1.9. 小结
- 第 2 章 第一个 Python 程序
- 2.2. 函数声明
- 2.3. 文档化函数
- 2.4. 万物皆对象
- 2.5. 代码缩进
- 2.6. 测试模块
- 第 3 章 内置数据类型
- 3.2. List 介绍
- 3.3. Tuple 介绍
- 3.4. 变量声明
- 3.5. 格式化字符串
- 3.6. 映射 list
- 3.7. 连接 list 与分割字符串
- 3.8. 小结
- 第 4 章 自省的威力
- 4.2. 使用可选参数和命名参数
- 4.3. 使用 type、str、dir 和其它内置函数
- 4.4. 通过 getattr 获取对象引用
- 4.5. 过滤列表
- 4.6. and 和 or 的特殊性质
- 4.7. 使用 lambda 函数
- 4.8. 全部放在一起
- 4.9. 小结
- 第 5 章 对象和面向对象
- 5.2. 使用 from module import 导入模块
- 5.3. 类的定义
- 5.4. 类的实例化
- 5.5. 探索 UserDict: 一个封装类
- 5.6. 专用类方法
- 5.7. 高级专用类方法
- 5.8. 类属性介绍
- 5.9. 私有函数
- 5.10. 小结
- 第 6 章 异常和文件处理
- 6.2. 与文件对象共事
- 6.3. for 循环
- 6.4. 使用 sys.modules
- 6.5. 与 Directory 共事
- 6.6. 全部放在一起
- 6.7. 小结
- 第 7 章 正则表达式
- 7.2. 个案研究:街道地址
- 7.3. 个案研究:罗马字母
- 7.4. 使用{n,m} 语法
- 7.5. 松散正则表达式
- 7.6. 个案研究: 解析电话号码
- 7.7. 小结
- 第 8 章 HTML 处理
- 8.2. sgmllib.py 介绍
- 8.3. 从 HTML 文档中提取数据
- 8.4. BaseHTMLProcessor.py 介绍
- 8.5. locals 和 globals
- 8.6. 基于 dictionary 的字符串格式化
- 8.7. 给属性值加引号
- 8.8. dialect.py 介绍
- 8.9. 全部放在一起
- 8.10. 小结
- 第 9 章 XML 处理
- 9.2. 包
- 9.3. XML 解析
- 9.4. Unicode
- 9.5. 搜索元素
- 9.6. 访问元素属性
- 9.7. Segue
- 第 10 章 Scripts 和 Streams
- 10.2. 标准输入、输出和错误
- 10.3. 缓冲节点查询
- 10.4. 查找节点的直接子节点
- 10.5. 通过节点类型创建独立的处理句柄 Creating separate handlers by node type
- 10.6. 处理命令行参数
- 10.7. 全部放在一起
- 10.8. 小结
- 第 11 章 HTTP Web 服务
- 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. 小结
- 第 12 章 SOAP Web 服务
- 12.2. 安装 SOAP 库
- 12.3. 步入 SOAP
- 12.4. SOAP 网络服务查错
- 12.5. WSDL 介绍
- 12.6. 以 WSDL 进行 SOAP 内省
- 12.7. 搜索 Google
- 12.8. SOAP 网络服务故障排除
- 12.9. 小结
- 第 13 章 单元测试
- 13.2. 深入
- 13.3. 介绍 romantest.py
- 13.4. 正面测试(Testing for success)
- 13.5. 负面测试(Testing for failure)
- 13.6. 完备性检测(Testing for sanity)
- 第 14 章 以测试优先为原则的编程
- 14.2. roman.py, 第 2 阶段
- 14.3. roman.py, 第 3 阶段
- 14.4. roman.py, 第 4 阶段
- 14.5. roman.py, 第 5 阶段
- 第 15 章 重构
- 15.2. 应对需求变化
- 15.3. 重构
- 15.4. 后记
- 15.5. 小结
- 第 16 章 有效编程(Functional Programming)
- 16.2. 找到路径
- 16.3. 过滤已访问列表
- 16.4. 关联已访问列表
- 16.5. 数据中心思想编程
- 16.6. 动态导入模块
- 16.7. 全部放在一起
- 16.8. 小结
- 第 17 章 动态函数
- 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. 小结
- 第 18 章 性能优化
- 18.2. 使用 timeit 模块
- 18.3. 优化正则表达式
- 18.4. 优化字典查找
- 18.5. 优化列表操作
- 18.6. 优化字符串操作
- 18.7. 小结
- 附录 A. 进一步阅读
- 附录 B. 五分钟回顾
- 附录 C. 技巧和窍门
- 附录 D. 示例清单
- 附录 E. 修订历史
- 附录 F. 关于本书
- 附录 G. GNU Free Documentation License
- 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
- 附录 H. Python license
- H.B. Terms and conditions for accessing or otherwise using Python
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
附录 E. 修订历史
附录 E. 修订历史
2004-05-20 (5.4)
- Added 第 12.1 节 “概览”.
- Added 第 12.2 节 “安装 SOAP 库”.
- Added 第 12.3 节 “步入 SOAP”.
- Added 第 12.4 节 “ SOAP 网络服务查错”.
- Added 第 12.5 节 “WSDL 介绍”.
- Added 第 12.6 节 “以 WSDL 进行 SOAP 内省”.
- Added 第 12.7 节 “搜索 Google”.
- Added 第 12.8 节 “ SOAP 网络服务故障排除”.
- Added 第 12.9 节 “小结”.
- Incorporated technical reviewer revisions in 第 16 章 有效编程(Functional Programming) and 第 18 章 性能优化.
2004-05-12 (5.3)
- Added isalpha() example to 第 18.3 节 “优化正则表达式”. Thanks, Paul.
- Incorporated copyediting revisions into 第 5 章 对象和面向对象 and 第 6 章 异常和文件处理.
- Fixed URL of 第 9.7 节 “Segue”.
2004-05-09 (5.2)
- Fixed URL of 第 14.1 节 “roman.py, 第 1 阶段”.
- Added 第 18.1 节 “概览”.
- Added 第 18.2 节 “使用 timeit 模块”.
- Added 第 18.3 节 “优化正则表达式”.
- Added 第 18.4 节 “优化字典查找”.
- Added 第 18.5 节 “优化列表操作”.
- Added 第 18.6 节 “优化字符串操作”.
- Added 第 18.7 节 “小结”.
2004-05-05 (5.1)
- Clarified 例 7.7 “校验十位数” and 例 7.8 “用{n,m}语法确认罗马数字”.
- Clarified 例 7.10 “发现数字”.
- Fixed typo in 例 11.6 “测试 Last-Modified”. Thanks, Jesir.
- Fixed typo in 例 3.11 “extend (扩展) 与 append (追加)的差别”. Thanks, Daniel.
- Incorporated technical reviewer revisions.
- Incorporated copy editor revisions in 第 1 章 安装 Python, 第 2 章 第一个 Python 程序, 第 3 章 内置数据类型, and 第 4 章 自省的威力.
2004-04-16 (5.0)
- Added 第 11.1 节 “概览”.
- Added 第 11.2 节 “避免通过 HTTP 重复地获取数据”.
- Added 第 11.3 节 “HTTP 的特性”.
- Added 第 11.4 节 “调试 HTTP web 服务”.
- Added 第 11.5 节 “设置 User-Agent”.
- Added 第 11.6 节 “处理 Last-Modified 和 ETag”.
- Added 第 11.7 节 “处理重定向”.
- Added 第 11.8 节 “处理被压缩的数据”.
- Added 第 11.9 节 “全部放在一起”.
- Added 第 11.10 节 “小结”.
- Added 例 3.11 “extend (扩展) 与 append (追加)的差别”.
- Changed descriptions of how to download Python throughout 第 1 章 安装 Python to be more generic and less version-specific.
- Changed references of “module” to “program” in 第 2.1 节 “概览” and 第 2.4 节 “万物皆对象” since we haven't explained modules yet.
- Added explicit instructions in 第 2.4 节 “万物皆对象” for the reader to open their Python IDE and follow along with the examples.
- Changed all examples and descriptions that referred to truth values 1 and 0 to refer to True and False.
- Updated 例 3.22 “字符串格式化与字符串连接的比较” to show new Python 2.3 TypeError message.
- Fixed typo in 例 17.19 “使用生成器替代递归”.
- Fixed typo in 第 7.7 节 “小结”.
- Fixed typo in 例 17.9 “plural4.py”.
2004-03-25 (4.9)
- Finished 第 16.7 节 “全部放在一起”.
- Added 第 16.8 节 “小结”.
- Split unit testing introduction into two chapters, 第 13 章 单元测试 and 第 14 章 以测试优先为原则的编程.
- Fixed typo in 例 17.12 “plural4.py 的完成”.
- Fixed typo in 例 17.18 “介绍生成器”.
2004-03-25 (4.8)
- Finished 第 17.7 节 “plural.py, 第 6 阶段”.
- Finished 第 17.8 节 “小结”.
- Fixed broken links in 附录 A, 进一步阅读, 附录 B, 五分钟回顾, 附录 C, 技巧和窍门, 附录 D, 示例清单.
2004-03-21 (4.7)
- Added 第 17.1 节 “概览”.
- Added 第 17.2 节 “plural.py, 第 1 阶段”.
- Added 第 17.3 节 “plural.py, 第 2 阶段”.
- Added 第 17.4 节 “plural.py, 第 3 阶段”.
- Added 第 17.5 节 “plural.py, 第 4 阶段”.
- Added 第 17.6 节 “plural.py, 第 5 阶段”.
- Added 第 17.7 节 “plural.py, 第 6 阶段” (unfinished).
- Added 第 17.8 节 “小结” (unfinished).
2004-03-14 (4.6)
- Finished 第 7.4 节 “使用{n,m} 语法”.
- Finished 第 7.5 节 “松散正则表达式”.
- Finished 第 7.6 节 “个案研究: 解析电话号码”.
- Expanded 第 7.7 节 “小结”.
2004-03-07 (4.5)
- Added 第 7.1 节 “概览”.
- Added 第 7.4 节 “使用{n,m} 语法” (incomplete).
- Added 第 7.5 节 “松散正则表达式” (incomplete).
- Added 第 7.6 节 “个案研究: 解析电话号码” (incomplete).
- Added 第 7.7 节 “小结”.
- Moved 第 7.2 节 “个案研究:街道地址” and 第 7.3 节 “个案研究:罗马字母” to regular expressions chapter.
- Added 例 6.20 “Listing Directories with glob”.
- Added 例 6.7 “写入文件”.
- Added 例 5.11 “直接继承自内建数据类型 dict”.
- Added 例 10.11 “打印到 stderr”.
- Added 例 4.12 “使用getattr 创建分发者” and 例 4.13 “getattr 缺省值”.
- Added 例 2.6 “if 语句”.
- Added 例 3.23 “数值的格式化”.
- Split 第 5 章 对象和面向对象 into 2 chapters: 第 5 章 对象和面向对象 and 第 6 章 异常和文件处理.
- Split 第 9 章 XML 处理 into 2 chapters: 第 9 章 XML 处理 and 第 10 章 Scripts 和 Streams.
- Split 第 13 章 单元测试 into 2 chapters: 第 13 章 单元测试 and 第 15 章 重构.
- Renamed help to info in 第 4 章 自省的威力.
- Fixed incorrect back-reference in 第 8.5 节 “locals 和 globals”.
- Fixed broken example links in 第 8.1 节 “概览”.
- Fixed missing line in example in 第 9.1 节 “概览”.
- Fixed typo in 第 8.2 节 “sgmllib.py 介绍”.
2003-10-08 (4.4)
- Added 第 1.1 节 “哪一种 Python 适合您?”.
- Added 第 1.2 节 “Windows 上的 Python”.
- Added 第 1.3 节 “Mac OS X 上的 Python ”.
- Added 第 1.4 节 “Mac OS 9 上的 Python ”.
- Added 第 1.5 节 “RedHat Linux 上的 Python ”.
- Added 第 1.6 节 “Debian GNU/Linux 上的 Python ”.
- Added 第 1.7 节 “从源代码安装 Python ”.
- Added 第 1.9 节 “小结”.
- Removed preface.
- Fixed typo in 例 3.27 “odbchelper.py 的输出结果”.
- Added link to PEP 257 in 第 2.3 节 “文档化函数”.
- Fixed link to How to Think Like a Computer Scientist in 第 3.4.2 节 “一次赋多值”.
- Added note about implied assert in 第 3.3 节 “Tuple 介绍”.
2003-09-28 (4.3)
- Added 第 16.6 节 “动态导入模块”.
- Added 第 16.7 节 “全部放在一起” (incomplete).
- Fixed links in 附录 F, 关于本书.
2003-09-17 (4.2.1)
- Fixed links on index page.
- Fixed syntax highlighting.
2003-09-12 (4.2)
- Fixed typos in 第 16.4 节 “关联已访问列表”, 第 16.3 节 “过滤已访问列表”, 第 7.2 节 “个案研究:街道地址”, and 第 10.6 节 “处理命令行参数”. Thanks, Doug.
- Fixed external link in 第 5.3 节 “类的定义”. Thanks, Harry.
- Changed wording at the end of 第 4.5 节 “过滤列表”. Thanks, Paul.
- Added sentence in 第 13.5 节 “负面测试(Testing for failure)” to make it clearer that we're passing a function to assertRaises, not a function name as a string. Thanks, Stephen.
- Fixed typo in 第 8.8 节 “dialect.py 介绍”. Thanks, Wellie.
- Fixed links to dialectized examples.
- Fixed external link to the history of Roman numerals. Thanks to many concerned Roman numeral fans around the world.
2002-07-28 (4.1)
- Added 第 10.3 节 “缓冲节点查询”.
- Added 第 10.4 节 “查找节点的直接子节点”.
- Added 第 10.5 节 “通过节点类型创建独立的处理句柄 Creating separate handlers by node type”.
- Added 第 10.6 节 “处理命令行参数”.
- Added 第 10.7 节 “全部放在一起”.
- Added 第 10.8 节 “小结”.
- Fixed typo in 第 6.5 节 “与 Directory 共事”. It's os.getcwd(), not os.path.getcwd(). Thanks, Abhishek.
- Fixed typo in 第 3.7 节 “连接 list 与分割字符串”. When evaluated (instead of printed), the Python IDE will display single quotes around the output.
- Changed str example in 第 4.8 节 “全部放在一起” to use a user-defined function, since Python 2.2 obsoleted the old example by defining a doc string for the built-in dictionary methods. Thanks Eric.
- Fixed typo in 第 9.4 节 “Unicode”, "anyway" to "anywhere". Thanks Frank.
- Fixed typo in 第 13.6 节 “完备性检测(Testing for sanity)”, doubled word "accept". Thanks Ralph.
- Fixed typo in 第 15.3 节 “重构”, C?C?C? matches 0 to 3 C characters, not 4. Thanks Ralph.
- Clarified and expanded explanation of implied slice indices in 例 3.9 “Slice 简写”. Thanks Petr.
- Added historical note in 第 5.5 节 “探索 UserDict: 一个封装类” now that Python 2.2 supports subclassing built-in datatypes directly.
- Added explanation of update dictionary method in 例 5.9 “定义 UserDict 类”. Thanks Petr.
- Clarified Python's lack of overloading in 第 5.5 节 “探索 UserDict: 一个封装类”. Thanks Petr.
- Fixed typo in 例 8.8 “BaseHTMLProcessor 介绍”. HTML comments end with two dashes and a bracket, not one. Thanks Petr.
- Changed tense of note about nested scopes in 第 8.5 节 “locals 和 globals” now that Python 2.2 is out. Thanks Petr.
- Fixed typo in 例 8.14 “BaseHTMLProcessor.py 中的基于 dictionary 的字符串格式化”; a space should have been a non-breaking space. Thanks Petr.
- Added title to note on derived classes in 第 5.5 节 “探索 UserDict: 一个封装类”. Thanks Petr.
- Added title to note on downloading unittest in 第 15.3 节 “重构”. Thanks Petr.
- Fixed typesetting problem in 例 16.6 “在当前目录运行脚本”; tabs should have been spaces, and the line numbers were misaligned. Thanks Petr.
- Fixed capitalization typo in the tip on truth values in 第 3.2 节 “List 介绍”. It's True and False, not true and false. Thanks to everyone who pointed this out.
- Changed section titles of 第 3.1 节 “Dictionary 介绍”, 第 3.2 节 “List 介绍”, and 第 3.3 节 “Tuple 介绍”. "Dictionaries 101" was a cute way of saying that this section was an beginner's introduction to dictionaries. American colleges tend to use this numbering scheme to indicate introductory courses with no prerequisites, but apparently this is a distinctly American tradition, and it was unnecessarily confusing my international readers. In my defense, when I initially wrote these sections a year and a half ago, it never occurred to me that I would have international readers.
- Upgraded to version 1.52 of the DocBook XSL stylesheets.
- Upgraded to version 6.52 of 由 Michael Kay 编制的 SAXON XSLT 解析器.
- Various accessibility-related stylesheet tweaks.
- Somewhere between this revision and the last one, she said yes. The wedding will be next spring.
2002-04-26 (4.0-2)
- Fixed typo in 例 4.15 “and 介绍”.
- Fixed typo in 例 2.4 “模块导入的搜索路径”.
- Fixed Windows help file (missing table of contents due to base stylesheet changes).
2002-04-19 (4.0)
- Expanded 第 2.4 节 “万物皆对象” to include more about import search paths.
- Fixed typo in 例 3.7 “负的 list 索引”. Thanks to Brian for the correction.
- Rewrote the tip on truth values in 第 3.2 节 “List 介绍”, now that Python has a separate boolean datatype.
- Fixed typo in 第 5.2 节 “使用 from module import 导入模块” when comparing syntax to Java. Thanks to Rick for the correction.
- Added note in 第 5.5 节 “探索 UserDict: 一个封装类” about derived classes always overriding ancestor classes.
- Fixed typo in 例 5.18 “修改类属性”. Thanks to Kevin for the correction.
- Added note in 第 6.1 节 “异常处理” that you can define and raise your own exceptions. Thanks to Rony for the suggestion.
- Fixed typo in 例 8.17 “处理特别标记”. Thanks for Rick for the correction.
- Added note in 例 8.18 “SGMLParser” about what the return codes mean. Thanks to Howard for the suggestion.
- Added str function when creating StringIO instance in 例 10.6 “openAnything”. Thanks to Ganesan for the idea.
- Added link in 第 13.3 节 “介绍 romantest.py” to explanation of why test cases belong in a separate file.
- Changed 第 16.2 节 “找到路径” to use os.path.dirname instead of os.path.split. Thanks to Marc for the idea.
- Added code samples (piglatin.py, parsephone.py, and plural.py) for the upcoming regular expressions chapter.
- Updated and expanded list of Python distributions on home page.
2002-01-01 (3.9)
- Added 第 9.4 节 “Unicode”.
- Added 第 9.5 节 “搜索元素”.
- Added 第 9.6 节 “访问元素属性”.
- Added 第 10.1 节 “抽象输入源”.
- Added 第 10.2 节 “标准输入、输出和错误”.
- Added simple counter for loop examples (good usage and bad usage) in 第 6.3 节 “for 循环”. Thanks to Kevin for the idea.
- Fixed typo in 例 3.25 “keys, values 和 items 函数” (two elements of params.values() were reversed).
- Fixed mistake in 第 4.3 节 “使用 type、str、dir 和其它内置函数” with regards to the name of the __builtin__ module. Thanks to Denis for the correction.
- Added additional example in 第 16.2 节 “找到路径” to show how to run unit tests in the current working directory, instead of the directory where regression.py is located.
- Modified explanation of how to derive a negative list index from a positive list index in 例 3.7 “负的 list 索引”. Thanks to Renauld for the suggestion.
- Updated links on home page for downloading latest version of Python.
- Added link on home page to Bruce Eckel's preliminary draft of Thinking in Python, a marvelous (and advanced) book on design patterns and how to implement them in Python.
2001-11-18 (3.8)
- Added 第 16.2 节 “找到路径”.
- Added 第 16.3 节 “过滤已访问列表”.
- Added 第 16.4 节 “关联已访问列表”.
- Added 第 16.5 节 “数据中心思想编程”.
- Expanded sample output in 第 16.1 节 “概览”.
- Finished 第 9.3 节 “XML 解析”.
2001-09-30 (3.7)
- Added 第 9.2 节 “包”.
- Added 第 9.3 节 “XML 解析”.
- Cleaned up introductory paragraph in 第 9.1 节 “概览”. Thanks to Matt for this suggestion.
- Added Java tip in 第 5.2 节 “使用 from module import 导入模块”. Thanks to Ori for this suggestion.
- Fixed mistake in 第 4.8 节 “全部放在一起” where I implied that you could not use is None to compare to a null value in Python. In fact, you can, and it's faster than == None. Thanks to Ori pointing this out.
- Clarified in 第 3.2 节 “List 介绍” where I said that li = li + other was equivalent to li.extend(other). The result is the same, but extend is faster because it doesn't create a new list. Thanks to Denis pointing this out.
- Fixed mistake in 第 3.2 节 “List 介绍” where I said that li += other was equivalent to li = li + other. In fact, it's equivalent to li.extend(other), since it doesn't create a new list. Thanks to Denis pointing this out.
- Fixed typographical laziness in 第 2 章 第一个 Python 程序; when I was writing it, I had not yet standardized on putting string literals in single quotes within the text. They were set off by typography, but this is lost in some renditions of the book (like plain text), making it difficult to read. Thanks to Denis for this suggestion.
- Fixed mistake in 第 2.2 节 “函数声明” where I said that statically typed languages always use explicit variable + datatype declarations to enforce static typing. Most do, but there are some statically typed languages where the compiler figures out what type the variable is based on usage within the code. Thanks to Tony for pointing this out.
- Added link to Spanish translation.
2001-09-06 (3.6.4)
- Added code in BaseHTMLProcessor to handle non-HTML entity references, and added a note about it in 第 8.4 节 “BaseHTMLProcessor.py 介绍”.
- Modified 例 8.11 “globals 介绍” to include htmlentitydefs in the output.
2001-09-04 (3.6.3)
- Fixed typo in 第 9.1 节 “概览”.
- Added link to Korean translation.
2001-08-31 (3.6.2)
- Fixed typo in 第 13.6 节 “完备性检测(Testing for sanity)” (the last requirement was listed twice).
2001-08-31 (3.6)
- Finished 第 8 章 HTML 处理 with 第 8.9 节 “全部放在一起” and 第 8.10 节 “小结”.
- Added 第 15.4 节 “后记”.
- Started 第 9 章 XML 处理 with 第 9.1 节 “概览”.
- Started 第 16 章 有效编程(Functional Programming) with 第 16.1 节 “概览”.
- Fixed long-standing bug in colorizing script that improperly colorized the examples in 第 8 章 HTML 处理.
- Added link to French translation. They did the right thing and translated the source XML, so they can re-use all my build scripts and make their work available in six different formats.
- Upgraded to version 1.43 of the DocBook XSL stylesheets.
- Upgraded to version 6.43 of 由 Michael Kay 编制的 SAXON XSLT 解析器.
- Massive stylesheet changes, moving away from a table-based layout and towards more appropriate use of cascading style sheets. Unfortunately, CSS has as many compatibility problems as anything else, so there are still some tables used in the header and footer. The resulting HTML version looks worse in Netscape 4, but better in modern browsers, including Netscape 6, Mozilla, Internet Explorer 5, Opera 5, Konqueror, and iCab. And it's still completely readable in Lynx. I love Lynx. It was my first web browser. You never forget your first.
- Moved to Ant to have better control over the build process, which is especially important now that I'm juggling six output formats and two languages.
- Consolidated the available downloadable archives; previously, I had different files for each platform, because the .zip files that Python's zipfile module creates are non-standard and can't be opened by Aladdin Expander on Mac OS. But the .zip files that Ant creates are completely standard and cross-platform. Go Ant!
- Now hosting the complete XML source, XSL stylesheets, and associated scripts and libraries on SourceForge. There's also CVS access for the really adventurous.
- Re-licensed the example code under the new-and-improved GPL-compatible Python 2.1.1 license. Thanks, Guido; people really do care, and it really does matter.
2001-06-26 (3.5)
- Added explanation of strong/weak/static/dynamic datatypes in 第 2.2 节 “函数声明”.
- Added case-sensitivity example in 第 3.1 节 “Dictionary 介绍”.
- Use os.path.normcase in 第 5 章 对象和面向对象 to compensate for inferior operating systems whose files aren't case-sensitive.
- Fixed indentation problems in code samples in PDF version.
2001-05-31 (3.4)
- Added 第 14.5 节 “roman.py, 第 5 阶段”.
- Added 第 15.1 节 “处理 bugs”.
- Added 第 15.2 节 “应对需求变化”.
- Added 第 15.3 节 “重构”.
- Added 第 15.5 节 “小结”.
- Fixed yet another stylesheet bug that was dropping nested </span> tags.
2001-05-24 (3.3)
- Added 第 13.2 节 “深入”.
- Added 第 13.3 节 “介绍 romantest.py”.
- Added 第 13.4 节 “正面测试(Testing for success)”.
- Added 第 13.5 节 “负面测试(Testing for failure)”.
- Added 第 13.6 节 “完备性检测(Testing for sanity)”.
- Added 第 14.1 节 “roman.py, 第 1 阶段”.
- Added 第 14.2 节 “roman.py, 第 2 阶段”.
- Added 第 14.3 节 “roman.py, 第 3 阶段”.
- Added 第 14.4 节 “roman.py, 第 4 阶段”.
- Tweaked stylesheets in an endless quest for complete Netscape/Mozilla compatibility.
2001-05-03 (3.2)
- Added 第 8.8 节 “dialect.py 介绍”.
- Added 第 7.2 节 “个案研究:街道地址”.
- Fixed bug in handle_decl method that would produce incorrect declarations (adding a space where it couldn't be).
- Fixed bug in CSS (introduced in 2.9) where body background color was missing.
2001-04-18 (3.1)
- Added code in BaseHTMLProcessor.py to handle declarations, now that Python 2.1 supports them.
- Added note about nested scopes in 第 8.5 节 “locals 和 globals”.
- Fixed obscure bug in 例 8.1 “BaseHTMLProcessor.py” where attribute values with character entities would not be properly escaped.
- Now recommending (but not requiring) Python 2.1, due to its support of declarations in sgmllib.py.
- Updated download links on the home page to point to Python 2.1, where available.
- Moved to versioned filenames, to help people who redistribute the book.
2001-04-16 (3.0)
- Fixed minor bug in code listing in 第 8 章 HTML 处理.
- Added link to Chinese translation on home page.
2001-04-13 (2.9)
- Added 第 8.5 节 “locals 和 globals”.
- Added 第 8.6 节 “基于 dictionary 的字符串格式化”.
- Tightened code in 第 8 章 HTML 处理, specifically ChefDialectizer, to use fewer and simpler regular expressions.
- Fixed a stylesheet bug that was inserting blank pages between chapters in the PDF version.
- Fixed a script bug that was stripping the DOCTYPE from the home page.
- Added link to Python Cookbook, and added a few links to individual recipes in 附录 A, 进一步阅读.
- Switched to Google for searching on http://diveintopython.org/.
- Upgraded to version 1.36 of the DocBook XSL stylesheets, which was much more difficult than it sounds. There may still be lingering bugs.
2001-03-26 (2.8)
- Added 第 8.3 节 “从 HTML 文档中提取数据”.
- Added 第 8.4 节 “BaseHTMLProcessor.py 介绍”.
- Added 第 8.7 节 “给属性值加引号”.
- Tightened up code in 第 4 章 自省的威力, using the built-in function callable instead of manually checking types.
- Moved 第 5.2 节 “使用 from module import 导入模块” from 第 4 章 自省的威力 to 第 5 章 对象和面向对象.
- Fixed typo in code example in 第 5.1 节 “概览” (added colon).
- Added several additional downloadable example scripts.
- Added Windows Help output format.
2001-03-16 (2.7)
- Added 第 8.2 节 “sgmllib.py 介绍”.
- Tightened up code in 第 8 章 HTML 处理.
- Changed code in 第 2 章 第一个 Python 程序 to use items method instead of keys.
- Moved 第 3.4.2 节 “一次赋多值” section to 第 2 章 第一个 Python 程序.
- Edited note about join string method, and provided a link to the new entry in The Whole Python FAQ that explains why join is a string method instead of a list method.
- Rewrote 第 4.6 节 “and 和 or 的特殊性质” to emphasize the fundamental nature of and and or and de-emphasize the and-or trick.
- Reorganized language comparisons into notes.
2001-02-28 (2.6)
- The PDF and Word versions now have colorized examples, an improved table of contents, and properly indented tips and notes.
- The Word version is now in native Word format, compatible with Word 97.
- The PDF and text versions now have fewer problems with improperly converted special characters (like trademark symbols and curly quotes).
- Added link to download Word version for UNIX, in case some twisted soul wants to import it into StarOffice or something.
- Fixed several notes which were missing titles.
- Fixed stylesheets to work around bug in Internet Explorer 5 for Mac OS which caused colorized words in the examples to be displayed in the wrong font. (Hello?!? Microsoft? Which part of <pre> don't you understand?)
- Fixed archive corruption in Mac OS downloads.
- In first section of each chapter, added link to download examples. (My access logs show that people skim or skip the two pages where they could have downloaded them (the home page and preface), then scramble to find a download link once they actually start reading.)
- Tightened the home page and preface even more, in the hopes that someday someone will read them.
- Soon I hope to get back to actually writing this book instead of debugging it.
2001-02-23 (2.5)
- Added 第 6.4 节 “使用 sys.modules”.
- Added 第 6.5 节 “与 Directory 共事”.
- Moved 例 6.17 “分割路径名” from 第 3.4.2 节 “一次赋多值” to 第 6.5 节 “与 Directory 共事”.
- Added 第 6.6 节 “全部放在一起”.
- Added 第 5.10 节 “小结”.
- Added 第 8.1 节 “概览”.
- Fixed program listing in 例 6.10 “遍历 dictionary” which was missing a colon.
2001-02-12 (2.4.1)
- Changed newsgroup links to use “news:” protocol, now that deja.com is defunct.
- Added file sizes to download links.
2001-02-12 (2.4)
- Added “further reading” links in most sections, and collated them in 附录 A, 进一步阅读.
- Added URLs in parentheses next to external links in text version.
2001-02-09 (2.3)
- Rewrote some of the code in 第 5 章 对象和面向对象 to use class attributes and a better example of multi-variable assignment.
- Reorganized 第 5 章 对象和面向对象 to put the class sections first.
- Added 第 5.8 节 “类属性介绍”.
- Added 第 6.1 节 “异常处理”.
- Added 第 6.2 节 “与文件对象共事”.
- Merged the “review” section in 第 5 章 对象和面向对象 into 第 5.1 节 “概览”.
- Colorized all program listings and examples.
- Fixed important error in 第 2.2 节 “函数声明”: functions that do not explicitly return a value return None, so you can assign the return value of such a function to a variable without raising an exception.
- Added minor clarifications to 第 2.3 节 “文档化函数”, 第 2.4 节 “万物皆对象”, and 第 3.4 节 “变量声明”.
2001-02-02 (2.2)
- Edited 第 4.4 节 “通过 getattr 获取对象引用”.
- Added titles to xref tags, so they can have their cute little tooltips too.
- Changed the look of the revision history page.
- Fixed problem I introduced yesterday in my HTML post-processing script that was causing invalid HTML character references and breaking some browsers.
- Upgraded to version 1.29 of the DocBook XSL stylesheets.
2001-02-01 (2.1)
- Rewrote the example code of 第 4 章 自省的威力 to use getattr instead of exec and eval, and rewrote explanatory text to match.
- Added example of list operators in 第 3.2 节 “List 介绍”.
- Added links to relevant sections in the summary lists at the end of each chapter (第 3.8 节 “小结” and 第 4.9 节 “小结”).
2001-01-31 (2.0)
- Split 第 5.6 节 “专用类方法” into three sections, 第 5.5 节 “探索 UserDict: 一个封装类”, 第 5.6 节 “专用类方法”, and 第 5.7 节 “高级专用类方法”.
- Changed notes on garbage collection to point out that Python 2.0 and later can handle circular references without additional coding.
- Fixed UNIX downloads to include all relevant files.
2001-01-15 (1.9)
- Removed introduction to 第 2 章 第一个 Python 程序.
- Removed introduction to 第 4 章 自省的威力.
- Removed introduction to 第 5 章 对象和面向对象.
- Edited text ruthlessly. I tend to ramble.
2001-01-12 (1.8)
- Added more examples to 第 3.4.2 节 “一次赋多值”.
- Added 第 5.3 节 “类的定义”.
- Added 第 5.4 节 “类的实例化”.
- Added 第 5.6 节 “专用类方法”.
- More minor stylesheet tweaks, including adding titles to link tags, which, if your browser is cool enough, will display a description of the link target in a cute little tooltip.
2001-01-03 (1.71)
- Made several modifications to stylesheets to improve browser compatibility.
2001-01-02 (1.7)
- Added introduction to 第 2 章 第一个 Python 程序.
- Added introduction to 第 4 章 自省的威力.
- Added review section to 第 5 章 对象和面向对象 [later removed]
- Added 第 5.9 节 “私有函数”.
- Added 第 6.3 节 “for 循环”.
- Added 第 3.4.2 节 “一次赋多值”.
- Wrote scripts to convert book to new output formats: one single HTML file, PDF, Microsoft Word 97, and plain text.
- Registered the diveintopython.org domain and moved the book there, along with links to download the book in all available output formats for offline reading.
- Modified the XSL stylesheets to change the header and footer navigation that displays on each page. The top of each page is branded with the domain name and book version, followed by a breadcrumb trail to jump back to the chapter table of contents, the main table of contents, or the site home page.
2000-12-11 (1.6)
- Added 第 4.8 节 “全部放在一起”.
- Finished 第 4 章 自省的威力 with 第 4.9 节 “小结”.
- Started 第 5 章 对象和面向对象 with 第 5.1 节 “概览”.
2000-11-22 (1.5)
- Added 第 4.6 节 “and 和 or 的特殊性质”.
- Added 第 4.7 节 “使用 lambda 函数”.
- Added appendix that lists section abstracts.
- Added appendix that lists tips.
- Added appendix that lists examples.
- Added appendix that lists revision history.
- Expanded example of mapping lists in 第 3.6 节 “映射 list”.
- Encapsulated several more common phrases into entities.
- Upgraded to version 1.25 of the DocBook XSL stylesheets.
2000-11-14 (1.4)
- Added 第 4.5 节 “过滤列表”.
- Added dir documentation to 第 4.3 节 “使用 type、str、dir 和其它内置函数”.
- Added in example in 第 3.3 节 “Tuple 介绍”.
- Added additional note about if __name__ trick under MacPython.
- Switched to 由 Michael Kay 编制的 SAXON XSLT 解析器.
- Upgraded to version 1.24 of the DocBook XSL stylesheets.
- Added db-html processing instructions with explicit filenames of each chapter and section, to allow deep links to content even if I add or re-arrange sections later.
- Made several common phrases into entities for easier reuse.
- Changed several literal tags to constant.
2000-11-09 (1.3)
- Added section on dynamic code execution.
- Added links to relevant section/example wherever I refer to previously covered concepts.
- Expanded introduction of chapter 2 to explain what the function actually does.
- Explicitly placed example code under the GNU General Public License and added appendix to display license. [Note 8/16/2001: code has been re-licensed under GPL-compatible Python license]
- Changed links to licenses to use xref tags, now that I know how to use them.
2000-11-06 (1.2)
- Added first four sections of chapter 2.
- Tightened up preface even more, and added link to Mac OS version of Python.
- Filled out examples in "Mapping lists" and "Joining strings" to show logical progression.
- Added output in chapter 1 summary.
2000-10-31 (1.1)
- Finished chapter 1 with sections on mapping and joining, and a chapter summary.
- Toned down the preface, added links to introductions for non-programmers.
- Fixed several typos.
2000-10-30 (1.0)
- Initial publication
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论