On Fri, Sep 22, 2017 at 3:07 AM, Rhodri James <rho...@kynesim.co.uk> wrote:
> On 21/09/17 17:31, Chris Angelico wrote:
>>
>> For a good while, I was in the same position. But instead of massively
>> rewriting everything, all I did was to adjust the material to use
>> Py2/Py3 compatible syntax. Adding parens around your print calls won't
>> stop it from being Py2-compatible, and it means that the shift to Py3
>> becomes a lot easier.
>
>
> It's compatible syntax, but it doesn't half look weird in Py2.
>
>>>> x=2
>>>> print("x is", x)
> ('x is', 2)
>>>>
>
> is very unfriendly to young beginners.  We did consider it, but decided it
> was a non-starter; it was less effort to ignore Py3 entirely.

True, it's only identical if you do the formatting explicitly:

print("x is %s" % x)

But that does happen to be a very common case.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to