Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into test_precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Nov 29, 2024
2 parents 50a869f + 807bd57 commit 8087926
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 222 deletions.
20 changes: 19 additions & 1 deletion mathics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@
See the documentation for the full license."""


# Disabled breakpoint
def disabled_breakpoint():
"""
This breakpoint handler can be used as a dummy breakpoint
handler function which does not stop in Mathics3 when `Breakpoint[]` is
called. In effect, it disables, going into a Python breakpoint handler.
Here is how to set this from inside Mathics3:
SetEnvironment["PYTHONBREAKPOINT" -> "mathics.disabled_breakpoint"];
Or when invoking `mathics` from a POSIX shell:
PYTHONBREAKPOINT=mathics.disabled_breakpoint mathics # other arguments
See https://docs.python.org/3/library/functions.html#breakpoint for information on
the Python builtin breakpoint() function
"""
# Note that we were called. In Django and other front-ends, the
# print message below will appear on the console; it might not be user
# visible by default.
print("Hit disabled breakpoint.")
3 changes: 1 addition & 2 deletions mathics/builtin/scoping.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,5 +712,4 @@ def eval(self, vars, expr, evaluation: Evaluation):

vars = dict(get_scoping_vars(vars, "With", evaluation))
result = expr.replace_vars(vars)
result.evaluate(evaluation)
return result
return result.evaluate(evaluation)
Loading

0 comments on commit 8087926

Please sign in to comment.