#10747: symbolic functions can be defined with a constant argument
----------------------------------------------------------+-----------------
Reporter: pang | Owner:
burcin
Type: defect | Status:
needs_review
Priority: minor | Milestone:
sage-4.7.1
Component: misc | Resolution:
Keywords: symbolic function, assignment, sd31 | Work_issues:
Upstream: N/A | Reviewer:
Karl-Dieter Crisman
Author: Burcin Erocal, Zafeirakis Zafeirakopoulos | Merged:
Dependencies: |
----------------------------------------------------------+-----------------
Changes (by kcrisman):
* reviewer: => Karl-Dieter Crisman
Comment:
Thanks for this - nice catch. I had to zoom through a lot of code, but
this does seem to be the most efficient way to do this.
I wonder about the error message. In theory, one could mess with this by
putting `_sage_const_` at the beginning of some legitimate variable...
Here are other fun things that already existed.
{{{
sage: f (x ,y, z ,w ) = 5=3
------------------------------------------------------------
File "<ipython console>", line 1
SyntaxError: keyword can't be an expression (<ipython console>, line 1)
sage: f(print)=5
------------------------------------------------------------
File "<ipython console>", line 1
__tmp__=var("print"); f =
symbolic_expression(Integer(5)).function(print)
^
SyntaxError: invalid syntax
}}}
There are lots of ways to mess with the `preparse_calculus` regular
expression to get things that will give fairly mystifying error messages.
Anyway, this all looks good, but I am prevented from testing it by my
computer having had its OS reinstalled, and somehow now gcc is missing. I
still have Xcode, but not gcc.
And great work on starting your contributions, Zaf!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10747#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.