Awful book warning: How to think like a (Python) programmer - non-working examples

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Feb 8 15:45:05 EST 2010


On Mon, Feb 8, 2010 at 3:36 PM, Dave Peterson <invalid at gmail.com> wrote:
> Page 7: Very first example doesn't compile: syntax error
> Pate 11: 2nd example: syntax error
> Page 12, printing digits: syntax error
> Page 13, printing a number: syntax error
> page 14, statements: syntax error
>

Let me guess, you're using Python 3.1. That book was written for
Python 2.x and there were several backwards-incompatible changes. For
instance, print was changed from a statement to a function. Which is
why the "Hello, World" doesn't work any more. If you want to use the
older books, use Python 2.6 instead.

>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list