MCPcopy Create free account
hub / github.com/Singular/Singular / evaluate

Method evaluate

Singular/dyn_modules/openmath/objects.py:191–205  ·  view source on GitHub ↗
(self, context)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 3

OMAClass · 0.85
evaluateMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected