[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings |
Date: |
Thu, 10 Oct 2019 17:13:33 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Thu, Oct 10, 2019 at 01:21:54PM +0100, Stefan Hajnoczi wrote:
> The following statement produces a SyntaxWarning with Python 3.8:
>
> if len(format) is 0:
> scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did
> you mean "=="?
>
> Use the conventional len(x) == 0 syntax instead.
>
> Reported-by: Daniel P. Berrangé <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> scripts/tracetool/__init__.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
signature.asc
Description: PGP signature