summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: