-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Implements sage.misc.misc.inject_variable(name, value) #7776
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
(note: patch prepared and tested on 4.2 not 4.3) |
comment:3
I'd rather it looked for |
Attachment: trac_7776-inject_variable-nt.patch.gz |
comment:4
Replying to @robertwb:
Ah, excellent, that sure is the right way for doing this. I had missed this Thanks for the suggestion! Patch updated. |
comment:5
This looks good to me. |
Reviewer: Mike Hansen |
comment:6
If I do
then tab-completion is broken. This is odd, and a little alarming. Since this function isn't meant for casual users, maybe this isn't a big deal, but otherwise, perhaps we should check that the first argument is a string. Here's another question:
Why is the warning only printed the first time? Is that just the nature of these warnings? |
Merged: sage-4.3.1.rc0 |
comment:8
Replying to @jhpalmieri:
Thanks for catching this. Please review the trivial #7928 follow up!
Ah, I had not noticed this. It seems to be a feature of warn. I added a comment in #7928. |
From the doc:
This will be used in the upcoming "inject_shorthands" patch for symmetric functions #7777, and could be used in the various inject_variable code instead of manipulating directly globals() (which could be incorrect if not called directly from the interpreter/notebook.
CC: @sagetrac-sage-combinat
Component: user interface
Author: Nicolas M. Thiéry
Reviewer: Mike Hansen
Merged: sage-4.3.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/7776
The text was updated successfully, but these errors were encountered: