Exemplo n.º 1
0
    def __eq__(self, other):
        """Check if two FunctionNodes are equal.

        This is actually a little subtle due to bound variables.

        In (lambda (x) x) and (lambda (y) y) will be equal (since they map to identical strings via
        pystring), even though the nodes below x and y will not themselves be equal. This is because
        pystring(x) and pystring(y) will not know where these came from and will just compare the uuids.

        But pystring on the lambda keeps track of where bound variables were introduced.

        """
        return pystring(self) == pystring(other)
Exemplo n.º 2
0
 def __repr__(self):
     return pystring(self)
Exemplo n.º 3
0
 def __str__(self):
     return pystring(self)