On Tue, Sep 28, 2010 at 5:02 AM, Alan Gauld <[email protected]>wrote:

>
> "Marc Tompkins" <[email protected]> wrote
>
>
>
>  The parentheses are optional in 2.6, mandatory in 3.  In 2.6, print and
>> print() are alternate ways to invoke the print statement
>>
>
> Not strictly true. They often give the same results but not always,
> see a recent thread on this. In particular
>
>  print ('a','b')
>>>>
>>>
> is quite different to
>
>  print 'a','b'
>>>>
>>>
> But that shouldn't be an issue for 'hello world'
>

And of course if you're on 2.6+ you can always add

from __future__ import print_function

and that will help prepare you for the eventual migration to 3+

-Wayne
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to