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: 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.__dict__
> True
> 
> But it does with SageObject:
> 
> sage: class Demo2(SageObject): pass
> ....: 
> sage: bla = Demo2()
> sage: blo = copy(bla)
> sage: blo is bla
> False
> sage: blo.__dict__ is bla.__dict__
> False
> 
> Is this intended or a bug ?
> 
> Cheers,
> 
> Florent
> 
> -- 
> 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

-- 
Florent Hivert
  ---
   Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
   There are three kinds of people in the world: those who can count,
and those who cannot.
  ---
Professeur, Coordinateur équipe Combinatoire et Algorithmes
Laboratoire d'Informatique, de Traitement de l'Information
  et des Systèmes (EA 4108)

Bureau U2.2.11          --  Campus du Madrillet
Université de Rouen     --  Faculté des Sciences et des Techniques
Avenue de l'université  --  76801 SAINT ETIENNE DU ROUVRAY
Tél. : 02.32.95.52.91   --  Fax : 02.32.95.51.87
Mél. : florent.hiv...@univ-rouen.fr

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