Skip to content

Commit

Permalink
fix #992
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Oct 27, 2020
1 parent 2e02e5f commit 55a1e29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mathics/builtin/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,8 @@ def init(self, expr, min=1):
self.min = min
if len(expr.leaves) == 2:
leaf_1 = expr.leaves[1]
if (leaf_1.has_form('List', 1, 2) and all(leaf.get_int_value() for leaf in leaf_1.leaves)):
allnumbers = all(not (leaf.get_int_value() is None) for leaf in leaf_1.get_leaves())
if (leaf_1.has_form('List', 1, 2) and allnumbers ):
self.max = leaf_1.leaves[-1].get_int_value()
self.min = leaf_1.leaves[0].get_int_value()
elif leaf_1.get_int_value():
Expand Down

0 comments on commit 55a1e29

Please sign in to comment.