Re: [sage-devel] Inheriting from Element and copy...

2009-12-04 Thread Florent Hivert
Hi everybody, Any chance to get an answer to that one ? I think this is indeed a bug but I'd rather have to point of view of the designers... Cheers, Florent > When inheriting from Element, copy does not copy the dictionary: > > sage: from sage.structure.element import Element > sage: cl

[sage-devel] Inheriting from Element and copy...

2009-12-01 Thread Florent Hivert
Hi everybody ! When inheriting from Element, copy does not copy the dictionary: sage: from sage.structure.element import Element sage: class Demo(Element): pass : sage: bla = Demo(parent = ZZ) sage: bla.a = [1,2,3] sage: blo = copy(bla) sage: blo is bla False sage: blo.__dict__ is bla.