def update(self, tails, edge_value=EDGEVALUE): #XXX limit tails to list or dict?
        """Add tails in sequence or mapping type to Vertex."""
        if isinstance(tails, dict):
            for key, value in tails.iteritems(): #derived classes may override setitem so don't use dict.update
                self[key] = value
        else:  #given iterable
            for key in tails:
                self[key] = edge_value
Add tails in sequence or mapping type to Vertex.
recipes/Python/578615_graph/recipe-578615.py