Stefan Hajnoczi writes:
> 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. B
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 syn
On 10/10/19 2:21 PM, 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.
Ah this is a new
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 syn
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é
Signed-off-by: Stefan Hajnoczi