Skip to: site menu | section menu | main content

IronPython in Action

Unleashing .NET with Python
Currently viewing: Front Page » Download Sources » About » Magic Methods » Errata

Errata, Corrections and Additions

This page is a collection of errata and corrections for IronPython in Action. If new releases of IronPython are made then any changes to the source code etc will also be posted.

Note

The sources for IronPython in Action have been tried with early versions of IronPython 2.6 and worked unmodified.

If you spot typos, have any questions or find something that looks like an error then please post on the IronPython in Action Author's Forum.

Errata

Many thanks to all of you who have provided corrections and found mistakes.

Chapter 1

Page 14

The SayHello method is incorrectly indented so that it appears inside the __init__ method.

Chapter 2

Page 32

Figure 2.2, inconsistent casing between boolean and Boolean.

Page 43

Section 2.2.2; the second while loop doesn't increment the counter variable a. The listing should be:

>>> a = 0
>>> while a < 6:
...   print a
...   if a >= 2:
...     break
...   a += 1
... else:
...   print 'Loop terminated normally'

Chapter 3

Page 65

Section 3.1.2; near the bottom it reads 'C #and ' instead of 'C# and'.

Chapter 4

Page 83

Section 4.1.1; Listing 4.1 - The 'c' is missing from the 'class' keyword.

"Protocols are a dynamically typed versions"; either drop "a" or make "versions" singular.

Page 94

Section 4.3.2, footnote 6; this states that .NET will use System.Text.Encoding.Default automatically. This isn't true. As the page itself notes .NET will use UTF-8 when you don't specify an encoding. Encoding.Default is an encoding representing the ANSI code page of the system. On a UK English Windows machine this will actually be the the windows-1252 encoding and not ISO-8859-1 as the footnote states. Codepage 1252 is a superset of ISO-8859-1.

Chapter 5

Page 115

In the print version only figure 5.1 has some of the text missing.

Page 125

Missing colon in listing 5.5 after while reader.MoveToNextAttributes().

In the same listing the code from line startHandler = self._elementHandlers.get(name, MISSING_HANDLERS)[0] is indented incorrectly and should be dedented one step.

Chapter 10

Page 247

Footnote 2: argparse didn't make it into Python 3.

Chapter 13

Page 334

First paragraph in 13.1.2 should say "System.Windows"; "S" is missing.

Chapter 14

Page 364

This page says "my" (referring to the author) without indicating that it is Michael.

Chapter 15

Page 397

Listing 15.5; _engine.GetService<ExceptionOperations)(); should read _engine.GetService<ExceptionOperations>(); (i.e., wrong right-bracket surrounding the generic type).

Page 417

One of the comments in the code example says "getting and settings"; should be "setting".

Appendix B

Page 435

The __dir__ method is missing from table B.3, Miscellaneous Methods.

Page 439

*= is missing from the list of inplace operators.

Back to top