Appendix E. Revision history

This revision history is also available in RSS.

28 July 2002 (4.1)

  • Added Caching node lookups.
  • Added Finding direct children of a node.
  • Added Creating separate handlers by node type.
  • Added Handling command line arguments.
  • Added Putting it all together.
  • Added Summary.
  • Fixed typo in The os module. It’s os.getcwd(), not os.path.getcwd(). Thanks, Abhishek.
  • Fixed typo in Joining lists and splitting strings. When evaluated (instead of printed), the Python IDE will display single quotes around the output.
  • Changed str example in Putting it all together 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 Unicode, "anyway" to "anywhere". Thanks Frank.
  • Fixed typo in Testing for sanity, doubled word "accept". Thanks Ralph.
  • Fixed typo in Refactoring, C?C?C? matches 0 to 3 C characters, not 4. Thanks Ralph.
  • Clarified and expanded explanation of implied slice indices in Example 1.18. Thanks Petr.
  • Added historical note in UserDict: a wrapper class now that Python 2.2 supports subclassing built-in datatypes directly.
  • Added explanation of update dictionary method in Example 3.11. Thanks Petr.
  • Clarified Python’s lack of overloading in UserDict: a wrapper class. Thanks Petr.
  • Fixed typo in Example 4.8. HTML comments end with two dashes and a bracket, not one. Thanks Petr.
  • Changed tense of note about nested scopes in locals and globals now that Python 2.2 is out. Thanks Petr.
  • Fixed typo in Example 4.14; a space should have been a non-breaking space. Thanks Petr.
  • Added title to note on derived classes in UserDict: a wrapper class. Thanks Petr.
  • Added title to note on downloading unittest in Refactoring. Thanks Petr.
  • Fixed typesetting problem in Example 7.6; tabs should have been spaces, and the line numbers were misaligned. Thanks Petr.
  • Fixed capitalization typo in the tip on truth values in Introducing lists. It’s True and False, not true and false. Thanks to everyone who pointed this out.
  • Changed section titles of Introducing dictionaries, Introducing lists, and Introducing tuples. "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 the SAXON XSLT processor from Michael Kay.
  • Various accessibility-related stylesheet tweaks.
  • Somewhere between this revision and the last one, she said yes. The wedding will be next spring.

26 April 2002 (4.0-2)

  • Fixed typo in Example 2.16.
  • Fixed typo in Example 1.6.
  • Fixed Windows help file (missing table of contents due to base stylesheet changes).

19 April 2002 (4.0)

  • Expanded Everything is an object to include more about import search paths.
  • Fixed typo in Example 1.16. Thanks to Brian for the correction.
  • Rewrote the tip on truth values in Introducing lists, now that Python has a separate boolean datatype.
  • Fixed typo in Importing modules using from module import when comparing syntax to Java. Thanks to Rick for the correction.
  • Added note in UserDict: a wrapper class about derived classes always overriding ancestor classes.
  • Fixed typo in Example 3.19. Thanks to Kevin for the correction.
  • Added note in Handling exceptions that you can define and raise your own exceptions. Thanks to Rony for the suggestion.
  • Fixed typo in Example 4.16. Thanks for Rick for the correction.
  • Added note in Example 4.17 about what the return codes mean. Thanks to Howard for the suggestion.
  • Added str function when creating StringIO instance in Example 5.30. Thanks to Ganesan for the idea.
  • Added link in Introducing to explanation of why test cases belong in a separate file.
  • Changed Finding the path to use os.path.dirname instead of os.path.split. Thanks to Marc for the idea.
  • Added code samples (,, and for the upcoming regular expressions chapter.
  • Updated and expanded list of Python distributions on home page.

1 January 2002 (3.9)

18 November 2001 (3.8)

30 September 2001 (3.7)

  • Added Packages.
  • Added Parsing XML.
  • Cleaned up introductory paragraph in Diving in. Thanks to Matt for this suggestion.
  • Added Java tip in Importing modules using from module import. Thanks to Ori for this suggestion.
  • Fixed mistake in Putting it all together 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 Introducing lists 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 Introducing lists 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 Getting To Know 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 Declaring functions 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.

6 September 2001 (3.6.4)

4 September 2001 (3.6.3)

31 August 2001 (3.6.2)

31 August 2001 (3.6)

  • Finished HTML Processing with Putting it all together and Summary.
  • Added Postscript.
  • Started XML Processing with Diving in.
  • Started Data-Centric Programming with Diving in.
  • Fixed long-standing bug in colorizing script that improperly colorized the examples in HTML Processing.
  • 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 the SAXON XSLT processor from Michael Kay.
  • 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.

26 June 2001 (3.5)

31 May 2001 (3.4)

24 May 2001 (3.3)

3 May 2001 (3.2)

  • Added Introducing
  • Added Regular expressions 101.
  • 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.

18 Apr 2001 (3.1)

  • Added code in to handle declarations, now that Python 2.1 supports them.
  • Added note about nested scopes in locals and globals.
  • Fixed obscure bug in Example 4.1 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
  • 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.

16 Apr 2001 (3.0)

13 Apr 2001 (2.9)

  • Added locals and globals.
  • Added Dictionary-based string formatting.
  • Tightened code in HTML Processing, 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 Further reading.
  • Switched to Google for searching on
  • Upgraded to version 1.36 of the DocBook XSL stylesheets, which was much more difficult than it sounds. There may still be lingering bugs.

26 Mar 2001 (2.8)

16 Mar 2001 (2.7)

28 Feb 2001 (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.

23 Feb 2001 (2.5)

12 Feb 2001 (2.4.1)

  • Changed newsgroup links to use “news:” protocol, now that is defunct.
  • Added file sizes to download links.

12 Feb 2001 (2.4)

  • Added “further reading” links in most sections, and collated them in Further reading.
  • Added URLs in parentheses next to external links in text version.

9 Feb 2001 (2.3)

2 Feb 2001 (2.2)

  • Edited Getting object references with 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.

1 Feb 2001 (2.1)

  • Rewrote the example code of The Power Of Introspection to use getattr instead of exec and eval, and rewrote explanatory text to match.
  • Added example of list operators in Introducing lists.
  • Added links to relevant sections in the summary lists at the end of each chapter (Summary and Summary).

31 Jan 2001 (2.0)

15 Jan 2001 (1.9)

12 Jan 2001 (1.8)

3 Jan 2001 (1.71)

  • Made several modifications to stylesheets to improve browser compatibility.

2 Jan 2001 (1.7)

  • Added introduction to Getting To Know Python.
  • Added introduction to The Power Of Introspection.
  • Added review section to An Object-Oriented Framework [later removed]
  • Added Private functions.
  • Added for loops.
  • Added Assigning multiple values at once.
  • Wrote scripts to convert book to new output formats: one single HTML file, PDF, Microsoft Word 97, and plain text.
  • Registered the 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.

11 Dec 2000 (1.6)

22 Nov 2000 (1.5)

14 Nov 2000 (1.4)

  • Added Filtering lists.
  • Added dir documentation to type, str, dir, and other built-in functions.
  • Added in example in Introducing tuples.
  • Added additional note about if __name__ trick under MacPython.
  • Switched to the SAXON XSLT processor from Michael Kay.
  • 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.

9 Nov 2000 (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.

6 Nov 2000 (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.

31 Oct 2000 (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.

30 Oct 2000 (1.0)

  • Initial publication