Skip to content

Commit 96911dd

Browse files
authored
Merge pull request #1150 from mmatera/fixPymathicsContext
fix pymathics context
2 parents 349ea11 + 6c4e2a0 commit 96911dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mathics/builtin/assignment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,8 +1757,8 @@ def apply(self, module, evaluation):
17571757
# the list, it seems to be preferable to add this PyMathics
17581758
# at the beginning.
17591759
context_path = evaluation.definitions.get_context_path()
1760-
if "PyMathics`" not in context_path:
1761-
context_path.insert(0, "PyMathics`")
1760+
if "Pymathics`" not in context_path:
1761+
context_path.insert(0, "Pymathics`")
17621762
evaluation.definitions.set_context_path(context_path)
17631763

17641764
return module

mathics/builtin/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def contribute(self, definitions, is_pymodule=False):
8989
self.context = "Pymathics`" if is_pymodule else "System`"
9090

9191
name = self.get_name()
92-
9392
options = {}
9493
option_syntax = "Warn"
9594
for option, value in self.options.items():

mathics/core/definitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def load_pymathics_module(self, module, remove_on_quit=True):
134134
if hasattr(loaded_module, "__all__")
135135
else dir(loaded_module)
136136
)
137+
137138
newsymbols = {}
138139
if not ("pymathics_version_data" in vars):
139140
raise PyMathicsLoadException(module)
@@ -439,7 +440,7 @@ def get_definition(self, name, only_if_exists=False) -> "Definition":
439440
candidates.append(pymathics)
440441
if builtin:
441442
candidates.append(builtin)
442-
443+
443444
definition = candidates[0] if len(candidates)==1 else None
444445
if len(candidates)>0 and not definition:
445446
attributes = user.attributes if user else (

0 commit comments

Comments
 (0)