-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split the merging definitions code from Definitions.get_definition #1280
Conversation
Co-authored-by: R. Bernstein <[email protected]>
LGTM |
@@ -1150,3 +880,281 @@ def get_history_length(self) -> int: | |||
if history_length is None or history_length > 100: | |||
history_length = 100 | |||
return history_length | |||
|
|||
|
|||
def autoload_files( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this moved to the end?
Also, autoloading files feels more like a session kind of thing than a "core" function. And finally the mathics.core.definitions module is pretty large so moving this somewhere else would balance things in terms of size too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because merge_definitions
requires the class Definition
to be defined, and seems reasonable to out all the functions together.
And yes, some of these functions should be moved to other places.
This PR continues the simplification of the code in the
mathics.code.definitions
module.