def __setitem__(self, tail, value):
        """Set edge capacity.  Will also update other vertex.reverse.

        >>> class myvertex(ReverseEdgeMixin, WVertex):
        ...    pass
        >>> g = Graph(VertexType=myvertex)
        >>> g[1][2] = 3
        >>> g[1], g[2].reverse
        ({2: 3}, {1: 3})
        """
        #print tail, value
        super(ReverseEdgeMixin, self).__setitem__(tail, value)
        value = self[tail] #value may have been modified by other classes
        if tail != self._id:  #creates tail vertex so check value first
            self._graph[tail].reverse[self._id] = value
            #print self._graph[tail].reverse
        else:
            self.reverse[self._id] = value
Set edge capacity.  Will also update other vertex.reverse.

        >>> class myvertex(ReverseEdgeMixin, WVertex):
        ...    pass
        >>> g = Graph(VertexType=myvertex)
        >>> g[1][2] = 3
        >>> g[1], g[2].reverse
        ({2: 3}, {1: 3})
        
recipes/Python/578615_graph/recipe-578615.py