| 189 | self.args = args |
| 190 | |
| 191 | def evaluate(self, context): |
| 192 | efunc = context.evaluate(self.func) |
| 193 | eargs = [context.evaluate(a) for a in self.args] |
| 194 | if callable(efunc): |
| 195 | if raiseException: |
| 196 | return context.apply(efunc,eargs) |
| 197 | else: |
| 198 | try: |
| 199 | return context.apply(efunc, eargs) |
| 200 | except EvaluationFailedError, NotImplementedError: |
| 201 | return OMA(efunc, eargs) |
| 202 | #return self |
| 203 | else: |
| 204 | #print efunc |
| 205 | return OMA(efunc, eargs) |
| 206 | def __str__ (self): |
| 207 | return "OMA"+"("+str(self.func)+str(self.args) |
| 208 | def __repr__ (self): |