That's a very hard question.

I found 
http://groups.google.com/group/sage-devel/browse_thread/thread/7499c3e834bd675b/5b2f8d39f4137684?lnk=gst&q=_unsafe_mutate+power+series#5b2f8d39f4137684
for more background.


Cheers,
Michael

Am 02.08.2010 um 11:08 schrieb Sebastian Pancratz:

> 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

-------------------------------------------
Michael Brickenstein
Mathematisches Forschungsinstitut Oberwolfach gGmbH
Schwarzwaldstr. 9 - 11
77709 Oberwolfach
Tel.: 07834/979-31
Fax: 07834/979-38

-- 
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

Reply via email to