Skip to content

Commit 55a1e29

Browse files
committed
fix #992
1 parent 2e02e5f commit 55a1e29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mathics/builtin/patterns.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,8 @@ def init(self, expr, min=1):
11141114
self.min = min
11151115
if len(expr.leaves) == 2:
11161116
leaf_1 = expr.leaves[1]
1117-
if (leaf_1.has_form('List', 1, 2) and all(leaf.get_int_value() for leaf in leaf_1.leaves)):
1117+
allnumbers = all(not (leaf.get_int_value() is None) for leaf in leaf_1.get_leaves())
1118+
if (leaf_1.has_form('List', 1, 2) and allnumbers ):
11181119
self.max = leaf_1.leaves[-1].get_int_value()
11191120
self.min = leaf_1.leaves[0].get_int_value()
11201121
elif leaf_1.get_int_value():

0 commit comments

Comments
 (0)