#13822: bezier_path modifies its argument
------------------------------------+---------------------------------------
Reporter: mjo | Owner: jason, was
Type: defect | Status: needs_info
Priority: major | Milestone: sage-5.11
Component: graphics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Michael Orlitzky | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by mjo):
Unless I messed up my testing, a plain `copy()` doesn't work. The `path`
parameter is a list of lists, so if you do a simple copy, you get a brand
new list containing all the old pointers to lists.
Even though `self.path` is a new list, this,
{{{
vertices = self.path[0]
}}}
sets `vertices` to the first element of that new list, which is one of the
lists that the user passed in. Then this,
{{{
vertices += curve
}}}
modifies his list.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13822#comment:5>
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/groups/opt_out.