question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python 3.8 SyntaxWarning: "is not" with a literal. Did you mean "!="?

See original GitHub issue
$ python3.8 -m py_compile lib/sqlalchemy/orm/query.py 
lib/sqlalchemy/orm/query.py:179: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if entities is not ():

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ggardiakoscommented, Oct 1, 2021

no I found it in some other code. replace is not with !=

hope that helps! 😃

On Fri, Oct 1, 2021 at 2:11 AM Federico Caselli @.***> wrote:

help me!

[image: image] https://user-images.githubusercontent.com/69169466/135548878-8944e180-4e24-4754-8b27-f6fe0ad0b65b.png

is this somewhere in the codebase?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sqlalchemy/sqlalchemy/issues/4938#issuecomment-931968940, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPXCOVXRR5HG7BZGNFST7LUEVNKZANCNFSM4JDY3EJA .

– -GG

312.399.6427

1reaction
ClarenceJiang-jiangcommented, Jun 17, 2020

help me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Python log a SyntaxWarning for 'is' with literals?
The compiler now produces a SyntaxWarning when identity checks ( is and is not ) are used with certain types of literals (e.g....
Read more >
Issue 43151: SyntaxWarning for 'is <literal>' - Python tracker
True >>> if x is 'a': pass # Error instead of warning, hence not executed. SyntaxError: "is" with a literal. Did you mean...
Read more >
pydevd_resolver.py:138: SyntaxWarning: "is not" with a literal ...
3 professional and Python 3.8.0 get the following error when I open Python Console does anyone know how to fix this? C:\Program Files\JetBrains\ ......
Read more >
SyntaxWarning: "is" with a literal. Did you mean "=="?
Python 3.8 adds a new SyntaxWarning if is or is not is used where == or != is correct. It's generated only when...
Read more >
Chris's Wiki :: blog/python/PythonIsWithLiteral
When I did, I got an interesting Python warning that I hadn't seen before: SyntaxWarning: "is not" with a literal. Did you mean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found