(edges)
return triangles
Builds the set of triangles formed by the supplied edges.  The
        triangles are arbitrary and need not be commutative.  A
        triangle is a set that contains all three of its sides.
Builds the set of triangles formed by the supplied edges.  The
        triangles are arbitrary and need not be commutative.  A
        triangle is a set that contains all three of its sides.
Builds the set of triangles formed by the supplied edges . The triangles are arbitrary and need not be commutative . A triangle is a set that contains all three of its sides .
def _list_triangles(edges):
        """
        Builds the set of triangles formed by the supplied edges.  The
        triangles are arbitrary and need not be commutative.  A
        triangle is a set that contains all three of its sides.
        """
        triangles = set()

        for w in edges:
            for v in edges:
                wv = DiagramGrid._juxtapose_edges(w, v)
                if wv and wv in edges:
                    triangles.add(frozenset([w, v, wv]))

        return triangles
def _list_triangles ( edges ) : triangles = set ( ) for w in edges : for v in edges : wv = DiagramGrid . _juxtapose_edges ( w , v ) if wv and wv in edges : triangles . add ( frozenset ( [ w , v , wv ] ) ) return triangles