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

Method runeval

Lib/bdb.py:920–938  ·  view source on GitHub ↗

Debug an expression executed via the eval() function. globals defaults to __main__.dict; locals defaults to globals.

(self, expr, globals=None, locals=None)

Source from the content-addressed store, hash-verified

918 self.stop_trace()
919
920 def runeval(self, expr, globals=None, locals=None):
921 """Debug an expression executed via the eval() function.
922
923 globals defaults to __main__.dict; locals defaults to globals.
924 """
925 if globals is None:
926 import __main__
927 globals = __main__.__dict__
928 if locals is None:
929 locals = globals
930 self.reset()
931 self.start_trace()
932 try:
933 return eval(expr, globals, locals)
934 except BdbQuit:
935 pass
936 finally:
937 self.quitting = True
938 self.stop_trace()
939
940 def runctx(self, cmd, globals, locals):
941 """For backwards-compatibility. Defers to run()."""

Callers 2

runevalFunction · 0.80
test_runeval_stepMethod · 0.80

Calls 4

resetMethod · 0.95
start_traceMethod · 0.95
stop_traceMethod · 0.95
evalFunction · 0.50

Tested by 1

test_runeval_stepMethod · 0.64