Opened 14 years ago
Closed 14 years ago
#6622 closed defect (fixed)
[with patch, positive review] substitution of a dict into a symbolic expression modifies the dict
Reported by: | was | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.1.1 |
Component: | calculus | Keywords: | |
Cc: | Merged in: | Sage 4.1.1.rc1 | |
Authors: | Bill Cauchois | Reviewers: | Burcin Erocal |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage: var('v t') sage: f = v*t sage: D = {v: 2} sage: f(D, t=3) 6 sage: D {v: 2, t: 3}
After the call above, D should *not* be changed. This issue was raised at this sage-support thread.
Attachments (1)
Change History (6)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 14 years ago by
Summary: | substitution of a dict into a symbolic expression modifies the dict → [with patch, needs review] substitution of a dict into a symbolic expression modifies the dict |
---|
This was a simple fix.
comment:4 Changed 14 years ago by
Authors: | → Bill Cauchois |
---|---|
Reviewers: | → Burcin Erocal |
Summary: | [with patch, needs review] substitution of a dict into a symbolic expression modifies the dict → [with patch, positive review] substitution of a dict into a symbolic expression modifies the dict |
comment:5 Changed 14 years ago by
Merged in: | → Sage 4.1.1.rc1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.