예제 #1
0
 def __new__(klass,function,*argexprs):
     if not argexprs:
         return ExprBase.__new__(klass,function)
     for arg in argexprs:
         if not isinstance(arg,Const):
             return ExprBase.__new__(klass,function,*argexprs)
     return Const(function(*[arg.value for arg in argexprs]))
예제 #2
0
 def __new__(klass, function, *argexprs):
     if not argexprs:
         return ExprBase.__new__(klass, function)
     for arg in argexprs:
         if not isinstance(arg, Const):
             return ExprBase.__new__(klass)
     return Const(function(*[arg.value for arg in argexprs]))
예제 #3
0
 def __new__(klass,*argexprs):
     for arg in argexprs:
         if not isinstance(arg,Const):
             return ExprBase.__new__(klass,*argexprs)
     return Const(klass.immediate([arg.value for arg in argexprs]))
예제 #4
0
 def __new__(klass, *argexprs):
     for arg in argexprs:
         if not isinstance(arg, Const):
             return ExprBase.__new__(klass, *argexprs)
     return Const(klass.immediate([arg.value for arg in argexprs]))