Skip to content

Conversation

@mmatera
Copy link
Contributor

@mmatera mmatera commented Sep 13, 2022

This continues #552. Now I removed the parameter python_form from to_python and replaced it with something local into the unique place where it is needed.

* adding the prototype of to_python in BaseElement
* adding type annotations to its paramenters.
* removing the use of the parameter n_evaluation in ``expr.to_python(n_evaluation=evaluation)`` in favor of ``eval_N(expr, evaluation).to_python()``
* adding several comments.
@mmatera mmatera changed the title Byebye python form Bye-bye python_form parameter. Sep 13, 2022
Copy link
Contributor

@TiagoCavalcante TiagoCavalcante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return py_obj

# Notice that in this case, `to_python` returns a Mathics Expression object,
# instead of a builtin native object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect over time that more iterations over the code will be done and the thing that seem unusual will be addressed or there will be explanations of why they are the way they are.

@rocky
Copy link
Member

rocky commented Sep 13, 2022

LGTM

@mmatera mmatera merged commit 4302237 into master Sep 13, 2022
@mmatera mmatera deleted the byebye_python_form branch September 13, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants