#14535: Mutability of Graphs
------------------------------------+---------------------------------------
       Reporter:  SimonKing         |         Owner:  jason, ncohen, rlm
           Type:  enhancement       |        Status:  needs_review      
       Priority:  major             |     Milestone:  sage-5.10         
      Component:  graph theory      |    Resolution:                    
       Keywords:  mutability graph  |   Work issues:                    
Report Upstream:  N/A               |     Reviewers:                    
        Authors:  Simon King        |     Merged in:                    
   Dependencies:  #14524            |      Stopgaps:                    
------------------------------------+---------------------------------------

Comment (by SimonKing):

 Replying to [comment:18 Stefan]:
 > Again, Matrices have (in my opinion) a decent balance:
 >
 > {{{
 > sage: A = matrix([[1,2],[3,4]])
 > sage: A.set_immutable()
 > sage: A[1,1] = 4
 > Traceback (most recent call last):
 > ...
 > ValueError: matrix is immutable; please change a copy instead (i.e., use
 copy(M) to change a copy of M).
 > sage: B = copy(A)
 > sage: B[1,1] = 1
 > }}}

 Actually I have not been aware that there is no `A.set_mutable`. So, thank
 you for the pointer!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14535#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

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


Reply via email to