'Construct a new edge.  If the edge is incomplete (i.e., if
``dot<len(rhs)``), then store the bindings as-is.  If the edge
is complete (i.e., if ``dot==len(rhs)``), then apply the
bindings to all nonterminals in ``lhs`` and ``rhs``, and then
clear the bindings.  See ``TreeEdge`` for a description of
the other arguments.'

def __init__(self, span, lhs, rhs, dot=0, bindings=None):

    if (bindings is None):
        bindings = {}
    if ((dot == len(rhs)) and bindings):
        lhs = self._bind(lhs, bindings)
        rhs = [self._bind(elt, bindings) for elt in rhs]
        bindings = {}
    TreeEdge.__init__(self, span, lhs, rhs, dot)
    self._bindings = bindings
    self._comparison_key = (self._comparison_key, tuple(sorted(bindings.items())))
