#17958: implement declare_var, deprecate (None)var
-----------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+------------------------
Comment (by nbruin):
Replying to [comment:62 vbraun]:
> To get this back on track, the minimal change that would satisfactorily
resolve the issue would be a warning (but keep `var` indefinitely)
> {{{
> sage: var('x, y') # warning but keep indefinitely
> Warning: var has side effects. Consider using %var x, y
> (x, y)
> }}}
> and
> {{{
> sage: %var x, y
> Defining x, y as symbolic variables.
> }}}
I think this would be an improvement, so I'd be in favour if this change,
even as proposed. Some details:
- the warning correctly mentions a snag about `var` and then proposes an
alternative that also has side-effects. I hate to make warning messages
more than one line, but perhaps more information is beneficial here:
{{{
Warning: var has side effects. Consider using SR.var('x,y') to return
symbolic variables and %var x,y for binding them.
}}}
- I personally like the printing of a message by `%var` for novices, but
comment:32 suggests that the printing is a nuisance. So is it better for
`%var` to do its work silently?
--
Ticket URL: <http://trac.sagemath.org/ticket/17958#comment:63>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.