Skip to content

Commit 562aedd

Browse files
mmaterarocky
authored andcommitted
fix cleanup after loading autoload definitions
1 parent 9f9c5b8 commit 562aedd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mathics/core/definitions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ def __init__(
169169
if name.startswith("Global`"):
170170
raise ValueError("autoload defined %s." % name)
171171

172-
self.builtin.update(self.user)
172+
# Move symbols defined in autoload modules
173+
# to Builtin definitions.
174+
# This seems important for Export and Import...
175+
# TODO: check why
176+
for name in self.user:
177+
self.builtin[name] = self.get_definition(name)
178+
173179
self.user = {}
174180
self.clear_cache()
175181

0 commit comments

Comments
 (0)