-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Sage allows creation of variables with empty name #9724
Comments
comment:1
Perhaps one could add a warning message giving a hint in other cases, too. From
|
comment:2
Fixed in the patch on #7496:
|
Changed keywords from variable empty name to sd31 |
comment:3
Apparently this means this should be closed. Probably proper form is to let the release manager change the milestone, right, Jeroen? :) I'm assuming that Mariah's comment on #7496 means she checked this out, so I'm putting her and Volker as reviewers for closing this. |
Reviewer: Volker Braun, Mariah Lenox |
Changed author from Harold Gutch to none |
comment:4
It does work. This is not mentioned in the patch for #7496, though, so I'm adding a doctest there. |
comment:5
Replying to @kcrisman:
No, it is easier if you change the milestone to "sage-duplicate/invalid/wontfix" and set to "positive_review". This gives me the best overview on http://trac.sagemath.org/sage_trac/report/40. I will then close the ticket. |
Sage allows you to create a variable with an empty name. While this at first appears not to cause any problems, one thing it does break is reset():
Sage also allows the creation of variables with other illegal names (e.g. '1a' or '1'), but for these at least reset() still works. There are two ways to fix this, the first is to disallow the creation of such variables via var(), but then all illegal cases would have to be taken care of, and it wouldn't help if you created illegal variables manually by inserting them into globals() (but I would argue that if you do this, you're on your own anyway). The second way to fix the behaviour above would be to make reset() able to delete empty variables too. This however is only viable if these variables don't break anything else, other than the case mentioned above.
CC: @haraldschilly
Component: symbolics
Keywords: sd31
Reviewer: Volker Braun, Mariah Lenox
Issue created by migration from https://trac.sagemath.org/ticket/9724
The text was updated successfully, but these errors were encountered: