Ejemplo n.º 1
0
 def __init__(self, op, *operands):
     typ = reduce(lambda a, b: xtyp(a, b) and a or None, operands)
     print "operands", operands
     print "found consensus type", typ and typ.type
     Has_Type.__init__(self, typ.type)
     self.operands = operands
     self.operator = op
     print "Operation:", str(self), Operation.__str__(self)
Ejemplo n.º 2
0
 def __init__(self, dest_type, expr):
     Has_Type.__init__(self, dest_type)
     self.expr = expr