[docs] Print Command
Zachary Ware
zachary.ware+pydocs at gmail.com
Mon Jan 13 22:53:27 CET 2014
On Fri, Dec 27, 2013 at 6:33 PM, Camil Kassar <camikasi at msn.com> wrote:
> IN Topic 2 and Topic 3, (maybe later topics) print commands are missing
> parenthesis, for example:
>
>>>> i = 256*256
>>>> print 'The value of i is', i
> The value of i is 65536
>
> Should be
>
>>>> i = 256*256
>>>> print ('The value of i is', i)
> The value of i is 65536
Which version of the docs are you looking at? It looks to me like
you're using the docs for Python 2.6 or 2.7. One of the major changes
between Python 2 and Python 3 was the switching of 'print' from a
statement to a function. In Python 2, since print is a statement, no
parentheses are required (and thus should not be present in the docs).
In Python 3, the parentheses are required since it is a function call
like any other.
Thanks for checking, though!
--
Zach
_______________________________________________
docs mailing list
docs at python.org
https://mail.python.org/mailman/listinfo/docs
More information about the docs
mailing list