示例#1
0
文件: operations.py 项目: bl0b/cppy
 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)
示例#2
0
文件: operations.py 项目: bl0b/cppy
 def __init__(self, dest_type, expr):
     Has_Type.__init__(self, dest_type)
     self.expr = expr