#15603: "immutable=True" for Graph/Digraph __init__ and copy()
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.1
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  7860f3997ae9ecd954f0696025fbb63e0219e78b
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/15603         |
   Dependencies:         |
  #15278                 |
-------------------------+-------------------------------------------------

Comment (by SimonKing):

 {{{
             sage: g = graphs.PetersenGraph()
             sage: g = DiGraph(g.edges(),immutable=False)
             sage: g.add_edge("Hey", "Heyyyyyyy")
             sage: {g:1}[g]
             TypeError: This graph is mutable, and thus not hashable.
 Create an immutable copy by `g.copy(data_structure='static_sparse')`
 }}}
 Should the error message mention the other (more intuitive) possibility
 `g.copy(immutable=True)`?

--
Ticket URL: <http://trac.sagemath.org/ticket/15603#comment:15>
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to