#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 vbraun):

 Patch needs to be rebased. Also:
   * `set_mutable` should be removed. If you know what you are doing, you
 can change the `_is_immutable` attribute. But we shouldn't write and
 document a method where you are likely to shoot yourself in the foot.
   * Override `__copy__` and make the copy an immutable object mutable. Its
 a common pattern to `copy(const_obj)` to get a mutable copy.
   * Please no `g.mutable(x=None)`. Method names should be crystal-clear
 about whether they mutate or not. But this is intentionally straddling the
 boundary between const and mutable, making code intentional hard to read.
 And there are lots of fun things that can go wrong now, for starters
 `x=None` will make it look like you are changing it while actually getting
 the value.

 This is also in accord with what matrices are doing.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14535#comment:22>
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