On Apr 19, 2010, at 4:05 PM, wb wrote:
On Apr 20, 12:25 am, Robert Bradshaw <rober...@math.washington.edu>
wrote:
On Apr 19, 2010, at 2:50 PM, wb wrote:
coming from C I'm confused about this behavior in assignment:
Since you know C, it may make sense to think of lists as being
similar
to pointers.
that makes sense - I guess I was expecting lists to behave like list
*classes* which have an overloaded assignment operator.
Turning this around: is there a 'list-like' data type in sage which
has 'true' assignment, i.e. copying all its content ?
Python inherits a lot from C. It is practically nothing like C++
(despite both being object oriented). There's no such thing as
assignment overloading--everything is heap allocated and you're just
passing around references under the hood.
Try doing
sage: import copy
sage: copy.<tab>
to if some of the functions there work for you.
- Robert
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org