On 2 Aug, 10:39, Michael Brickenstein <brickenst...@mfo.de> wrote:
> str  is very much immutable.
> So you can't even set some custom attribute.
> For that you have to sublass. Look what happens, when you subclass str
>  and get some mutable class
> this way:
>
> In [10]: class A(str):
>    ....:    pass
>
> In [11]: a=A()
>
> In [13]: copy(a) is a
> Out[13]: False
>
> while copy is the identity on str.

Hi Michael,

Thank you for the detailed information.  I think since strings unlike
polynomials are properly immutable, the decision to have copy return
the same instance can't simply be carried over to polynomials.

Personally, I think that "copy" should just return an independent
copy.

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

Reply via email to