MCPcopy Index your code
hub / github.com/RustPython/RustPython / eval_directive

Method eval_directive

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

Source from the content-addressed store, hash-verified

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

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