MCPcopy Index your code
hub / github.com/python/cpython / eval_directive

Method eval_directive

Lib/test/test_decimal.py:329–340  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

327 return self.eval_equation(s)
328
329 def eval_directive(self, s):
330 funct, value = (x.strip().lower() for x in s.split(':'))
331 if funct == 'rounding':
332 value = self.RoundingDict[value]
333 else:
334 try:
335 value = int(value)
336 except ValueError:
337 pass
338
339 funct = self.ChangeDict.get(funct, (lambda *args: None))
340 funct(value)
341
342 def eval_equation(self, s):
343

Callers 1

eval_lineMethod · 0.95

Calls 4

lowerMethod · 0.45
stripMethod · 0.45
splitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected