-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
In some places, you have syntax like this:
if not xalign == None:
It's actually against Python coding standard -> https://stackoverflow.com/questions/14247373/python-none-comparison-should-i-use-is-or
Use either:
xalign is None
or
xalign is not None
Statement:
not xalign == None
Is a double whammy as it's using a double negation, and it's hard to follow when it's True and when it's False, imagine those cases:
not "" == None -> True
not None == None -> False
not 0 == None -> True
not 1 == None -> True
not False == None -> True
So perhaps simpler:
xalign is not None
would suffice?
Metadata
Metadata
Assignees
Labels
No labels