summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-01-25 20:13:43 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-01-25 20:13:43 +0100
commit55d7a51a5590d8f6c7f05fe072c6cb243e57dd36 (patch)
tree9af64ed3d6dd794434bd4a4f8bd83fae3d78068b
parent4a2d4c80d3c4ec468937dcf7813e5f490bec001a (diff)
regex: minor and probably unnecessary tweak
-rw-r--r--regex/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/regex/__init__.py b/regex/__init__.py
index 3738251..d120de5 100644
--- a/regex/__init__.py
+++ b/regex/__init__.py
@@ -108,10 +108,10 @@ def make_pattern(tree, selected):
elif label == 'BinOp' or label == 'Compare':
# store the operator and left and/or right side
children = []
- if subpats[0]:
+ if subpats[0] is not None:
children += [subpats[0]]
children += [tree[1]]
- if subpats[2]:
+ if subpats[2] is not None:
children += [subpats[2]]
pat = Tree(label, children)
else: