Skip to content

Commit 361f767

Browse files
committed
merge
2 parents aee359c + 5e2543d commit 361f767

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

mathics/builtin/compilation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
Integer,
1212
Real,
1313
)
14-
from types import FunctionType
1514
from mathics.core.evaluation import Evaluation
15+
from types import FunctionType
16+
1617

1718
class Compile(Builtin):
1819
"""
@@ -125,7 +126,7 @@ def apply(self, vars, expr, evaluation):
125126
cfunc = _compile(expr, args)
126127
except CompileError:
127128
cfunc = None
128-
129+
# llvm compilation failed. Try to pythonize it
129130
if cfunc is None:
130131
try:
131132
def _pythonized_mathics_expr(*x):
@@ -139,7 +140,7 @@ def _pythonized_mathics_expr(*x):
139140
cfunc = _pythonized_mathics_expr
140141
except Exception as e:
141142
cfunc = None
142-
143+
# Pythonization failed. Show an error.
143144
if cfunc is None:
144145
evaluation.message('Compile', 'comperr', expr)
145146
args = Expression("List", *names)

0 commit comments

Comments
 (0)