Skip to content

Commit bb01184

Browse files
committed
mylis_2: tail-call optimization implemented
1 parent 54fbccd commit bb01184

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mylis/mylis_2/lis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ def evaluate(exp: Expression, env: Environment) -> Any:
237237
try:
238238
return proc(*values)
239239
except TypeError as exc:
240-
msg = f'{exc!r} invoking {proc!r}({args!r}): {lispstr(exp)}\nAST={exp!r}'
240+
msg = (f'{exc!r} invoking {proc!r}({args!r}):'
241+
f'\n{lispstr(exp)}\nAST={exp!r}')
241242
raise EvaluatorException(msg) from exc
242243
case _:
243244
raise InvalidSyntax(lispstr(exp))

0 commit comments

Comments
 (0)