On 2 Aug, 09:57, Michael Brickenstein <brickenst...@mfo.de> wrote: > I just tried it and the standard library functions also use that > "optimization". > > In [1]: from copy import copy > > In [2]: l="slkl" > > In [3]: copy(l) is l > Out[3]: True > > Cheers, > Michael
Perhaps my knowledge of Python isn't strong enough, but I guess strings actually *are* immutable, as opposed to the way that polynomials in Sage are only kind of immutable. This makes it perfectly alright to have "copy" return the object itself. However, if you are a user of Sage wanting to use the "_unsafe_mutate" option, I think you really want copy to give you an independent "copy", don't you? Kind regards, Sebastian -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org