def __repr__(self): if run_mode() is interactive: code = interactive_parser().parse(self) code = interactive_tagger().tag_loop_label(code) code = to_sexpression(code) result = interactive_solver().eval(code) return repr(result) if result is not None else '' else: return self.____repr____()
def __repr__(self): if run_mode() is interactive: code = interactive_parser().parse(self) code = interactive_tagger().tag_loop_label(code) result = interactive_solver().eval(code) return repr(result) if result is not None else '' x = _operator_repr(self.operand[0], self.operator) return '%s%s'%(self.operator.symbol, x)
def __repr__(self): if run_mode() is interactive: code = interactive_parser().parse(self) code = interactive_tagger().tag_loop_label(code) code = to_sexpression(code) result = interactive_solver().eval(code) return repr(result) if result is not None else '' return '%s(%s)'%(self.operator, ','.join([repr(e) for e in self.operand]))
def __repr__(self): if run_mode() is interactive: code = interactive_parser().parse(self) code = interactive_tagger().tag_loop_label(code) result = interactive_solver().eval(code) return repr(result) if result is not None else '' if result is not None else '' return ''.join([repr(x) for x in [self.item, self.separator, self.min, self.max, self.template, self.result, self.mode]])
def __repr__(self): if run_mode()==interactive: set_run_mode(noninteractive) code = interactive_parser().parse(self.exp) code = interactive_tagger().tag_loop_label(code) result = "%s"%code set_run_mode(interactive) return result else: return "'%s"%self.exp
def solve(exp): code = interactive_parser().parse(exp) code = interactive_tagger().tag_loop_label(code) code = to_sexpression(code) return interactive_solver().solve(code)