#5538: Family does not copy it's input.
---------------------------+------------------------------------------------
 Reporter:  hivert         |       Owner:  hivert               
     Type:  defect         |      Status:  new                  
 Priority:  major          |   Milestone:  sage-3.4.1           
Component:  combinatorics  |    Keywords:  Family, mutable input
---------------------------+------------------------------------------------
 When family got a dictionary it does not copy it's input so that one can
 modify it. One should use a kind of frozen dictionary.
 {{{
 sage: d = {1:"a", 3:"b", 4:"c"}
 sage: f = Family(d)
 sage: f
 Finite family {1: 'a', 3: 'b', 4: 'c'}
 sage: d.
 sage: d[2] = 'DD'
 sage: d
 {1: 'a', 2: 'DD', 3: 'b', 4: 'c'}
 sage: f
 Finite family {1: 'a', 2: 'DD', 3: 'b', 4: 'c'}
 }}}

 Florent

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5538>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to