Ticket #14732: trac_14732-review-ts.patch

File trac_14732-review-ts.patch, 960 bytes (added by tscrim, 6 years ago)
  • sage/combinat/posets/posets.py

    # HG changeset patch
    # User Travis Scrimshaw <tscrim@ucdavis.edu>
    # Date 1371110051 25200
    # Node ID 2158fe85a2c3e67453f1af94310c7a358edf2726
    # Parent  aa550bc1e0d3af9b39f30f5b7a608845098880e9
    #14732: review patch.
    
    diff --git a/sage/combinat/posets/posets.py b/sage/combinat/posets/posets.py
    a b class FinitePoset(UniqueRepresentation,  
    14381438            sage: P.to_graph()
    14391439            Graph on 4 vertices
    14401440            sage: P = Poset()
    1441             sage: P.to_graph()
     1441            sage: G = P.to_graph(); G
    14421442            Graph on 0 vertices
     1443
     1444        Check that it is hashable::
     1445
     1446            sage: hash(G) == hash(G)
     1447            True
    14431448        """
    14441449        from sage.graphs.graph import Graph
    1445         return Graph(self.hasse_diagram())
     1450        G = Graph(self.hasse_diagram())
     1451        G._immutable = True
     1452        return G
    14461453
    14471454    def level_sets(self):
    14481455        """