# Dive Into Python Python from novice to pro | Find:

## Appendix E. Revision history

### 2004-05-20 (5.4)

- Added Section 12.1, “Diving In”.
- Added Section 12.2, “Installing the SOAP Libraries”.
- Added Section 12.3, “First Steps with SOAP”.
- Added Section 12.4, “Debugging SOAP Web Services”.
- Added Section 12.5, “Introducing WSDL”.
- Added Section 12.6, “Introspecting SOAP Web Services with WSDL”.
- Added Section 12.7, “Searching Google”.
- Added Section 12.8, “Troubleshooting SOAP Web Services”.
- Added Section 12.9, “Summary”.
- Incorporated technical reviewer revisions in Chapter 16, Functional Programming and Chapter 18, Performance Tuning.

### 2004-05-12 (5.3)

- Added `isalpha()` example to Section 18.3, “Optimizing Regular Expressions”. Thanks, Paul.
- Incorporated copyediting revisions into Chapter 5, Objects and Object-Orientation and Chapter 6, Exceptions and File Handling.
- Fixed URL of Section 9.7, “Segue”.

### 2004-05-09 (5.2)

- Fixed URL of Section 14.1, “roman.py, stage 1”.
- Added Section 18.1, “Diving in”.
- Added Section 18.2, “Using the timeit Module”.
- Added Section 18.3, “Optimizing Regular Expressions”.
- Added Section 18.4, “Optimizing Dictionary Lookups”.
- Added Section 18.5, “Optimizing List Operations”.
- Added Section 18.6, “Optimizing String Manipulation”.
- Added Section 18.7, “Summary”.

### 2004-05-05 (5.1)

- Clarified Example 7.7, “Checking for Tens” and Example 7.8, “Validating Roman Numerals with {n,m}”.
- Clarified Example 7.10, “Finding Numbers”.
- Fixed typo in Example 11.6, “Testing Last-Modified”. Thanks, Jesir.
- Fixed typo in Example 3.11, “The Difference between extend and append”. Thanks, Daniel.
- Incorporated technical reviewer revisions.
- Incorporated copy editor revisions in Chapter 1, Installing Python, Chapter 2, Your First Python Program, Chapter 3, Native Datatypes, and Chapter 4, The Power Of Introspection.

### 2004-04-16 (5.0)

- Added Section 11.1, “Diving in”.
- Added Section 11.2, “How not to fetch data over HTTP”.
- Added Section 11.3, “Features of HTTP”.
- Added Section 11.4, “Debugging HTTP web services”.
- Added Section 11.5, “Setting the User-Agent”.
- Added Section 11.6, “Handling Last-Modified and ETag”.
- Added Section 11.7, “Handling redirects”.
- Added Section 11.8, “Handling compressed data”.
- Added Section 11.9, “Putting it all together”.
- Added Section 11.10, “Summary”.
- Added Example 3.11, “The Difference between extend and append”.
- Changed descriptions of how to download Python throughout Chapter 1, Installing Python to be more generic and less version-specific.
- Changed references of “module” to “program” in Section 2.1, “Diving in” and Section 2.4, “Everything Is an Object” since we haven't explained modules yet.
- Added explicit instructions in Section 2.4, “Everything Is an Object” 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 Example 3.22, “String Formatting vs. Concatenating” to show new Python 2.3 `TypeError` message.
- Fixed typo in Example 17.19, “Using generators instead of recursion”.
- Fixed typo in Section 7.7, “Summary”.
- Fixed typo in Example 17.9, “plural4.py”.

### 2004-03-25 (4.9)

- Finished Section 16.7, “Putting it all together”.
- Added Section 16.8, “Summary”.
- Split unit testing introduction into two chapters, Chapter 13, Unit Testing and Chapter 14, Test-First Programming.
- Fixed typo in Example 17.12, “plural4.py, finishing up”.
- Fixed typo in Example 17.18, “Introducing generators”.

### 2004-03-25 (4.8)

- Finished Section 17.7, “plural.py, stage 6”.
- Finished Section 17.8, “Summary”.
- Fixed broken links in Appendix A, Further reading, Appendix B, A 5-minute review, Appendix C, Tips and tricks, Appendix D, List of examples.

### 2004-03-21 (4.7)

- Added Section 17.1, “Diving in”.
- Added Section 17.2, “plural.py, stage 1”.
- Added Section 17.3, “plural.py, stage 2”.
- Added Section 17.4, “plural.py, stage 3”.
- Added Section 17.5, “plural.py, stage 4”.
- Added Section 17.6, “plural.py, stage 5”.
- Added Section 17.7, “plural.py, stage 6” (unfinished).
- Added Section 17.8, “Summary” (unfinished).

### 2004-03-14 (4.6)

- Finished Section 7.4, “Using the {n,m} Syntax”.
- Finished Section 7.5, “Verbose Regular Expressions”.
- Finished Section 7.6, “Case study: Parsing Phone Numbers”.
- Expanded Section 7.7, “Summary”.

### 2004-03-07 (4.5)

- Added Section 7.1, “Diving In”.
- Added Section 7.4, “Using the {n,m} Syntax” (incomplete).
- Added Section 7.5, “Verbose Regular Expressions” (incomplete).
- Added Section 7.6, “Case study: Parsing Phone Numbers” (incomplete).
- Added Section 7.7, “Summary”.
- Moved Section 7.2, “Case Study: Street Addresses” and Section 7.3, “Case Study: Roman Numerals” to regular expressions chapter.
- Added Example 6.20, “Listing Directories with glob”.
- Added Example 6.7, “Writing to Files”.
- Added Example 5.11, “Inheriting Directly from Built-In Datatype dict”.
- Added Example 10.11, “Printing to stderr”.
- Added Example 4.12, “Creating a Dispatcher with getattr” and Example 4.13, “getattr Default Values”.
- Added Example 2.6, “if Statements”.
- Added Example 3.23, “Formatting Numbers”.
- Split Chapter 5, Objects and Object-Orientation into 2 chapters: Chapter 5, Objects and Object-Orientation and Chapter 6, Exceptions and File Handling.
- Split Chapter 9, XML Processing into 2 chapters: Chapter 9, XML Processing and Chapter 10, Scripts and Streams.
- Split Chapter 13, Unit Testing into 2 chapters: Chapter 13, Unit Testing and Chapter 15, Refactoring.
- Renamed `help` to `info` in Chapter 4, The Power Of Introspection.
- Fixed incorrect back-reference in Section 8.5, “locals and globals”.
- Fixed broken example links in Section 8.1, “Diving in”.
- Fixed missing line in example in Section 9.1, “Diving in”.
- Fixed typo in Section 8.2, “Introducing sgmllib.py”.

### 2003-10-08 (4.4)

- Added Section 1.1, “Which Python is right for you?”.
- Added Section 1.2, “Python on Windows”.
- Added Section 1.3, “Python on Mac OS X”.
- Added Section 1.4, “Python on Mac OS 9”.
- Added Section 1.5, “Python on RedHat Linux”.
- Added Section 1.6, “Python on Debian GNU/Linux”.
- Added Section 1.7, “Python Installation from Source”.
- Added Section 1.9, “Summary”.
- Removed preface.
- Fixed typo in Example 3.27, “Output of odbchelper.py”.
- Added link to PEP 257 in Section 2.3, “Documenting Functions”.
- Fixed link to How to Think Like a Computer Scientist in Section 3.4.2, “Assigning Multiple Values at Once”.
- Added note about implied assert in Section 3.3, “Introducing Tuples”.

### 2003-09-28 (4.3)

- Added Section 16.6, “Dynamically importing modules”.
- Added Section 16.7, “Putting it all together” (incomplete).
- Fixed links in Appendix F, About the book.

### 2003-09-17 (4.2.1)

- Fixed links on index page.
- Fixed syntax highlighting.

### 2003-09-12 (4.2)

- Fixed typos in Section 16.4, “Mapping lists revisited”, Section 16.3, “Filtering lists revisited”, Section 7.2, “Case Study: Street Addresses”, and Section 10.6, “Handling command-line arguments”. Thanks, Doug.
- Fixed external link in Section 5.3, “Defining Classes”. Thanks, Harry.
- Changed wording at the end of Section 4.5, “Filtering Lists”. Thanks, Paul.
- Added sentence in Section 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 Section 8.8, “Introducing 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 Section 10.3, “Caching node lookups”.
- Added Section 10.4, “Finding direct children of a node”.
- Added Section 10.5, “Creating separate handlers by node type”.
- Added Section 10.6, “Handling command-line arguments”.
- Added Section 10.7, “Putting it all together”.
- Added Section 10.8, “Summary”.
- Fixed typo in Section 6.5, “Working with Directories”. It's `os.getcwd()`, not `os.path.getcwd()`. Thanks, Abhishek.
- Fixed typo in Section 3.7, “Joining Lists and Splitting Strings”. When evaluated (instead of printed), the Python IDE will display single quotes around the output.
- Changed `str` example in Section 4.8, “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 Section 9.4, “Unicode”, "anyway" to "anywhere". Thanks Frank.
- Fixed typo in Section 13.6, “Testing for sanity”, doubled word "accept". Thanks Ralph.
- Fixed typo in Section 15.3, “Refactoring”, `C?C?C?` matches 0 to 3 `C` characters, not 4. Thanks Ralph.
- Clarified and expanded explanation of implied slice indices in Example 3.9, “Slicing Shorthand”. Thanks Petr.
- Added historical note in Section 5.5, “Exploring UserDict: A Wrapper Class” now that Python 2.2 supports subclassing built-in datatypes directly.
- Added explanation of `update` dictionary method in Example 5.9, “Defining the UserDict Class”. Thanks Petr.
- Clarified Python's lack of overloading in Section 5.5, “Exploring UserDict: A Wrapper Class”. Thanks Petr.
- Fixed typo in Example 8.8, “Introducing BaseHTMLProcessor”. HTML comments end with two dashes and a bracket, not one. Thanks Petr.
- Changed tense of note about nested scopes in Section 8.5, “locals and globals” now that Python 2.2 is out. Thanks Petr.
- Fixed typo in Example 8.14, “Dictionary-based string formatting in BaseHTMLProcessor.py”; a space should have been a non-breaking space. Thanks Petr.
- Added title to note on derived classes in Section 5.5, “Exploring UserDict: A Wrapper Class”. Thanks Petr.
- Added title to note on downloading `unittest` in Section 15.3, “Refactoring”. Thanks Petr.
- Fixed typesetting problem in Example 16.6, “Running scripts in the current directory”; tabs should have been spaces, and the line numbers were misaligned. Thanks Petr.
- Fixed capitalization typo in the tip on truth values in Section 3.2, “Introducing Lists”. It's `True` and `False`, not `true` and `false`. Thanks to everyone who pointed this out.
- Changed section titles of Section 3.1, “Introducing Dictionaries”, Section 3.2, “Introducing Lists”, and Section 3.3, “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.

### 2002-04-26 (4.0-2)

- Fixed typo in Example 4.15, “Introducing and”.
- Fixed typo in Example 2.4, “Import Search Path”.
- Fixed Windows help file (missing table of contents due to base stylesheet changes).

### 2002-04-19 (4.0)

- Expanded Section 2.4, “Everything Is an Object” to include more about import search paths.
- Fixed typo in Example 3.7, “Negative List Indices”. Thanks to Brian for the correction.
- Rewrote the tip on truth values in Section 3.2, “Introducing Lists”, now that Python has a separate boolean datatype.
- Fixed typo in Section 5.2, “Importing Modules Using from module import” when comparing syntax to Java. Thanks to Rick for the correction.
- Added note in Section 5.5, “Exploring UserDict: A Wrapper Class” about derived classes always overriding ancestor classes.
- Fixed typo in Example 5.18, “Modifying Class Attributes”. Thanks to Kevin for the correction.
- Added note in Section 6.1, “Handling Exceptions” that you can define and raise your own exceptions. Thanks to Rony for the suggestion.
- Fixed typo in Example 8.17, “Handling specific tags”. Thanks for Rick for the correction.
- Added note in Example 8.18, “SGMLParser” about what the return codes mean. Thanks to Howard for the suggestion.
- Added `str` function when creating `StringIO` instance in Example 10.6, “openAnything”. Thanks to Ganesan for the idea.
- Added link in Section 13.3, “Introducing romantest.py” to explanation of why test cases belong in a separate file.
- Changed Section 16.2, “Finding the path” 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 Section 9.4, “Unicode”.
- Added Section 9.5, “Searching for elements”.
- Added Section 9.6, “Accessing element attributes”.
- Added Section 10.1, “Abstracting input sources”.
- Added Section 10.2, “Standard input, output, and error”.
- Added simple counter `for` loop examples (good usage and bad usage) in Section 6.3, “Iterating with for Loops”. Thanks to Kevin for the idea.
- Fixed typo in Example 3.25, “The keys, values, and items Functions” (two elements of `params.values()` were reversed).
- Fixed mistake in Section 4.3, “Using type, str, dir, and Other Built-In Functions” with regards to the name of the `__builtin__` module. Thanks to Denis for the correction.
- Added additional example in Section 16.2, “Finding the path” 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 Example 3.7, “Negative List Indices”. 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 Section 16.2, “Finding the path”.
- Added Section 16.3, “Filtering lists revisited”.
- Added Section 16.4, “Mapping lists revisited”.
- Added Section 16.5, “Data-centric programming”.
- Expanded sample output in Section 16.1, “Diving in”.
- Finished Section 9.3, “Parsing XML”.

### 2001-09-30 (3.7)

- Added Section 9.2, “Packages”.
- Added Section 9.3, “Parsing XML”.
- Cleaned up introductory paragraph in Section 9.1, “Diving in”. Thanks to Matt for this suggestion.
- Added Java tip in Section 5.2, “Importing Modules Using from module import”. Thanks to Ori for this suggestion.
- Fixed mistake in Section 4.8, “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 Section 3.2, “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 Section 3.2, “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 Chapter 2, Your First Python Program; 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 Section 2.2, “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.

### 2001-09-06 (3.6.4)

- Added code in `BaseHTMLProcessor` to handle non-HTML entity references, and added a note about it in Section 8.4, “Introducing BaseHTMLProcessor.py”.
- Modified Example 8.11, “Introducing globals” to include `htmlentitydefs` in the output.

### 2001-09-04 (3.6.3)

- Fixed typo in Section 9.1, “Diving in”.
- Added link to Korean translation.

### 2001-08-31 (3.6.2)

- Fixed typo in Section 13.6, “Testing for sanity” (the last requirement was listed twice).

### 2001-08-31 (3.6)

- Finished Chapter 8, HTML Processing with Section 8.9, “Putting it all together” and Section 8.10, “Summary”.
- Added Section 15.4, “Postscript”.
- Started Chapter 9, XML Processing with Section 9.1, “Diving in”.
- Started Chapter 16, Functional Programming with Section 16.1, “Diving in”.
- Fixed long-standing bug in colorizing script that improperly colorized the examples in Chapter 8, 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.

### 2001-06-26 (3.5)

- Added explanation of strong/weak/static/dynamic datatypes in Section 2.2, “Declaring Functions”.
- Added case-sensitivity example in Section 3.1, “Introducing Dictionaries”.
- Use `os.path.normcase` in Chapter 5, Objects and Object-Orientation 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 Section 14.5, “roman.py, stage 5”.
- Added Section 15.1, “Handling bugs”.
- Added Section 15.2, “Handling changing requirements”.
- Added Section 15.3, “Refactoring”.
- Added Section 15.5, “Summary”.
- Fixed yet another stylesheet bug that was dropping nested `</span>` tags.

### 2001-05-24 (3.3)

- Added Section 13.2, “Diving in”.
- Added Section 13.3, “Introducing romantest.py”.
- Added Section 13.4, “Testing for success”.
- Added Section 13.5, “Testing for failure”.
- Added Section 13.6, “Testing for sanity”.
- Added Section 14.1, “roman.py, stage 1”.
- Added Section 14.2, “roman.py, stage 2”.
- Added Section 14.3, “roman.py, stage 3”.
- Added Section 14.4, “roman.py, stage 4”.
- Tweaked stylesheets in an endless quest for complete Netscape/Mozilla compatibility.

### 2001-05-03 (3.2)

- Added Section 8.8, “Introducing dialect.py”.
- Added Section 7.2, “Case Study: Street Addresses”.
- 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 Section 8.5, “locals and globals”.
- Fixed obscure bug in Example 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 Chapter 8, HTML Processing.
- Added link to Chinese translation on home page.

### 2001-04-13 (2.9)

- Added Section 8.5, “locals and globals”.
- Added Section 8.6, “Dictionary-based string formatting”.
- Tightened code in Chapter 8, 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 Appendix A, Further reading.
- 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 Section 8.3, “Extracting data from HTML documents”.
- Added Section 8.4, “Introducing BaseHTMLProcessor.py”.
- Added Section 8.7, “Quoting attribute values”.
- Tightened up code in Chapter 4, The Power Of Introspection, using the built-in function `callable` instead of manually checking types.
- Moved Section 5.2, “Importing Modules Using from module import” from Chapter 4, The Power Of Introspection to Chapter 5, Objects and Object-Orientation.
- Fixed typo in code example in Section 5.1, “Diving In” (added colon).
- Added several additional downloadable example scripts.
- Added Windows Help output format.

### 2001-03-16 (2.7)

- Added Section 8.2, “Introducing sgmllib.py”.
- Tightened up code in Chapter 8, HTML Processing.
- Changed code in Chapter 2, Your First Python Program to use `items` method instead of `keys`.
- Moved Section 3.4.2, “Assigning Multiple Values at Once” section to Chapter 2, Your First Python Program.
- 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 Section 4.6, “The Peculiar Nature of and and or” to emphasize the fundamental nature of `and` and `or` and de-emphasize the `and-or` trick.
- Reorganized language comparisons into `note`s.

### 2001-02-28 (2.6)

- The PDF and Word versions now have colorized examples, an improved table of contents, and properly indented `tip`s and `note`s.
- 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 `note`s 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 Section 6.4, “Using sys.modules”.
- Added Section 6.5, “Working with Directories”.
- Moved Example 6.17, “Splitting Pathnames” from Section 3.4.2, “Assigning Multiple Values at Once” to Section 6.5, “Working with Directories”.
- Added Section 6.6, “Putting It All Together”.
- Added Section 5.10, “Summary”.
- Added Section 8.1, “Diving in”.
- Fixed program listing in Example 6.10, “Iterating Through a 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 Appendix A, Further reading.
- Added URLs in parentheses next to external links in text version.

### 2001-02-09 (2.3)

- Rewrote some of the code in Chapter 5, Objects and Object-Orientation to use class attributes and a better example of multi-variable assignment.
- Reorganized Chapter 5, Objects and Object-Orientation to put the class sections first.
- Added Section 5.8, “Introducing Class Attributes”.
- Added Section 6.1, “Handling Exceptions”.
- Added Section 6.2, “Working with File Objects”.
- Merged the “review” section in Chapter 5, Objects and Object-Orientation into Section 5.1, “Diving In”.
- Colorized all program listings and examples.
- Fixed important error in Section 2.2, “Declaring Functions”: 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 Section 2.3, “Documenting Functions”, Section 2.4, “Everything Is an Object”, and Section 3.4, “Declaring variables”.

### 2001-02-02 (2.2)

- Edited Section 4.4, “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.

### 2001-02-01 (2.1)

- Rewrote the example code of Chapter 4, The Power Of Introspection to use `getattr` instead of `exec` and `eval`, and rewrote explanatory text to match.
- Added example of list operators in Section 3.2, “Introducing Lists”.
- Added links to relevant sections in the summary lists at the end of each chapter (Section 3.8, “Summary” and Section 4.9, “Summary”).

### 2001-01-31 (2.0)

- Split Section 5.6, “Special Class Methods” into three sections, Section 5.5, “Exploring UserDict: A Wrapper Class”, Section 5.6, “Special Class Methods”, and Section 5.7, “Advanced Special Class Methods”.
- 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 Chapter 2, Your First Python Program.
- Removed introduction to Chapter 4, The Power Of Introspection.
- Removed introduction to Chapter 5, Objects and Object-Orientation.
- Edited text ruthlessly. I tend to ramble.

### 2001-01-12 (1.8)

- Added more examples to Section 3.4.2, “Assigning Multiple Values at Once”.
- Added Section 5.3, “Defining Classes”.
- Added Section 5.4, “Instantiating Classes”.
- Added Section 5.6, “Special Class Methods”.
- 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 Chapter 2, Your First Python Program.
- Added introduction to Chapter 4, The Power Of Introspection.
- Added review section to Chapter 5, Objects and Object-Orientation [later removed]
- Added Section 5.9, “Private Functions”.
- Added Section 6.3, “Iterating with for Loops”.
- Added Section 3.4.2, “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 `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 Section 4.8, “Putting It All Together”.
- Finished Chapter 4, The Power Of Introspection with Section 4.9, “Summary”.
- Started Chapter 5, Objects and Object-Orientation with Section 5.1, “Diving In”.

### 2000-11-22 (1.5)

- Added Section 4.6, “The Peculiar Nature of and and or”.
- Added Section 4.7, “Using lambda Functions”.
- 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 Section 3.6, “Mapping Lists”.
- Encapsulated several more common phrases into entities.
- Upgraded to version 1.25 of the DocBook XSL stylesheets.

### 2000-11-14 (1.4)

- Added Section 4.5, “Filtering Lists”.
- Added `dir` documentation to Section 4.3, “Using type, str, dir, and Other Built-In Functions”.
- Added `in` example in Section 3.3, “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`.

### 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