that book is full of errors =/ I'm not a regular python user, but I've also heard that the code contained within the book is not very "pythonic" and is really meant as a pseudocode. still no excuse for it to be incorrect.
when a book has typos, it makes me want to throw it in the fire.
I'm a bit rusty on subtleties of standard Python style these days (I mostly switched to Lua around Python 2.5 or so), but I got the same impression. Still, the conceptual explanations in the book are pretty good.
when a book has typos, it makes me want to throw it in the fire.