[docs] error in python introduction

Per Andersen pand at tietgen.dk
Tue Apr 23 12:48:08 CEST 2013


Hi there

Dont know if this is the right email to send this to.

I'm just starting learning python and looking through the introduction. http://docs.python.org/2/tutorial/introduction.html

I've noticed an error in what is written there. The print example in the end of the page does not have the correct syntax for version 3.3.1

>>> # Fibonacci series:
... # the sum of two elements defines the next
... a, b = 0, 1
>>> while b < 10:
...     print b
...     a, b = b, a+b


Should be


>>> # Fibonacci series:

... # the sum of two elements defines the next

... a, b = 0, 1

>>> while b < 10:

...     print (b)

...     a, b = b, a+b

Print seems to need a () now

Kind regards
Per Andersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130423/699f8dd1/attachment-0001.html>


More information about the docs mailing list