#6622: substitution of a dict into a symbolic expression modifies the dict
----------------------+-----------------------------------------------------
Reporter: was | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.1
Component: calculus | Keywords:
Reviewer: | Author:
Merged: |
----------------------+-----------------------------------------------------
Comment(by was):
Here's how to workaround it (namely, put "dict(constants)" instead of
"constants"). In the code for __call__ or subs, something similar should
be done.
{{{
sage: var('v t')
sage: f = v*t
sage: s = {v: 2}
sage: f(dict(s), t=3)
6
sage: s
{v: 2}
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6622#comment:1>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---