From 55d7a51a5590d8f6c7f05fe072c6cb243e57dd36 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 25 Jan 2018 20:13:43 +0100 Subject: regex: minor and probably unnecessary tweak --- regex/__init__.py | 4 ++-- 1 file 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: -- cgit v1.2.1