summaryrefslogtreecommitdiffstats
path: root/lib/ply
diff options
context:
space:
mode:
authorFrazer Clews <frazer.clews@codethink.co.uk>2020-01-16 17:11:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:30:58 +0000
commitb809a6812aa15a8a9af97bc382cc4b19571e6bfc (patch)
tree2558aa5cbbf8807b56968fdd1a2850a65aa897b7 /lib/ply
parent4367692a932ac135c5aa4f9f2a4e4f0150f76697 (diff)
downloadbitbake-b809a6812aa15a8a9af97bc382cc4b19571e6bfc.tar.gz
lib: amend code to use proper singleton comparisons where possible
amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/ply')
-rw-r--r--lib/ply/yacc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ply/yacc.py b/lib/ply/yacc.py
index d50886ed2..561784f2f 100644
--- a/lib/ply/yacc.py
+++ b/lib/ply/yacc.py
@@ -488,7 +488,7 @@ class LRParser:
# --! DEBUG
return result
- if t == None:
+ if t is None:
# --! DEBUG
debug.error('Error : %s',
@@ -766,7 +766,7 @@ class LRParser:
n = symstack[-1]
return getattr(n,"value",None)
- if t == None:
+ if t is None:
# We have some kind of parsing error here. To handle
# this, we are going to push the current token onto
@@ -1021,7 +1021,7 @@ class LRParser:
n = symstack[-1]
return getattr(n,"value",None)
- if t == None:
+ if t is None:
# We have some kind of parsing error here. To handle
# this, we are going to push the current token onto