[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ffb27358-cf7e-20f3-0468-f4cdb1088a7c@suse.de>
Date: Mon, 21 Jan 2019 15:45:52 -0800
From: Tony Jones <tonyj@...e.de>
To: seeteena <s1seetee@...ux.vnet.ibm.com>,
Jonathan Corbet <corbet@....net>
Cc: acme@...nel.org, jolsa@...hat.com, linux-kernel@...r.kernel.org,
ravi.bangoria@...ux.ibm.com
Subject: Re: [PATCH] perf scripts python: Add Python 3 support to
mem-phys-addr.py
On 1/17/19 1:48 AM, seeteena wrote:
> I have added
>> You have not added "from __future__ import print_function", so you're
>> relying on a Python 2 parsing oddity to make this work.
I didn't see Jon's comment earlier. Sorry to have given conflicting advice. I'd not considered it a parsing oddity but I think he's correct.
There is a flip side however and that is that this oddity probably works in versions older than v2.6 which is as far back as future support exists.
I can't imagine anyone is using < 2.6 but I have no idea what PYTHON=python2 actually implies. The other option is to switch to sys.write.stdout
which has always had more consistent semantics.
Tony
Powered by blists - more mailing lists