Skip to content

Commit

Permalink
Merge pull request #776 from Mathics3/eval-pymathics
Browse files Browse the repository at this point in the history
mathics.core.pymathics -> mathics.eval.pymathics
  • Loading branch information
rocky authored Feb 5, 2023
2 parents a9741b3 + 6b8ab56 commit 629275c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mathics/builtin/assignments/assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
A_PROTECTED,
A_SEQUENCE_HOLD,
)
from mathics.core.pymathics import PyMathicsLoadException, eval_load_module
from mathics.core.symbols import SymbolNull
from mathics.core.systemsymbols import SymbolFailed
from mathics.eval.pymathics import PyMathicsLoadException, eval_LoadModule


class _SetOperator:
Expand Down Expand Up @@ -83,7 +83,7 @@ class LoadModule(Builtin):
def eval(self, module, evaluation):
"LoadModule[module_String]"
try:
eval_load_module(module.value, evaluation)
eval_LoadModule(module.value, evaluation)
except PyMathicsLoadException:
evaluation.message(self.name, "notmathicslib", module)
return SymbolFailed
Expand Down
2 changes: 1 addition & 1 deletion mathics/core/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(
# Rocky: this smells of something not quite right in terms of
# modularity.
import mathics.format # noqa
from mathics.core.pymathics import PyMathicsLoadException, load_pymathics_module
from mathics.eval.pymathics import PyMathicsLoadException, load_pymathics_module

self.printforms = list(PrintForms)
self.outputforms = list(OutputForms)
Expand Down
3 changes: 1 addition & 2 deletions mathics/core/pymathics.py → mathics/eval/pymathics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
PyMathics3 module handling
"""
Expand All @@ -24,7 +23,7 @@ def __init__(self, module):
self.module = module


def eval_load_module(module_name: str, evaluation: Evaluation) -> str:
def eval_LoadModule(module_name: str, evaluation: Evaluation) -> str:
try:
load_pymathics_module(evaluation.definitions, module_name)
except (PyMathicsLoadException, ImportError):
Expand Down

0 comments on commit 629275c

Please sign in to comment.