This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author John Midgett
Recipients John Midgett
Date 2019-09-12.19:25:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568316344.45.0.265967787088.issue38146@roundup.psfhosted.org>
In-reply-to
Content
Per PEP 8, equality comparisons to None should use the "is" or "is not" keywords. However, if x is a {QVariant}NULL, the equality statement with the "is" keyword returns FALSE whereas the "==" comparison returns TRUE.  

Hence where cond = {QVariant}NULL:

    if cond is None  # Returns False
    if cond == None  # Returns True

This can cause some unexpected code anomalies (as it did for me) when adjusting code for PEP 8 compliance.
History
Date User Action Args
2019-09-12 19:25:44John Midgettsetrecipients: + John Midgett
2019-09-12 19:25:44John Midgettsetmessageid: <1568316344.45.0.265967787088.issue38146@roundup.psfhosted.org>
2019-09-12 19:25:44John Midgettlinkissue38146 messages
2019-09-12 19:25:44John Midgettcreate