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

Method runeval

Lib/bdb.py:911–929  ·  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

909 self.stop_trace()
910
911 def runeval(self, expr, globals=None, locals=None):
912 """Debug an expression executed via the eval() function.
913
914 globals defaults to __main__.dict; locals defaults to globals.
915 """
916 if globals is None:
917 import __main__
918 globals = __main__.__dict__
919 if locals is None:
920 locals = globals
921 self.reset()
922 self.start_trace()
923 try:
924 return eval(expr, globals, locals)
925 except BdbQuit:
926 pass
927 finally:
928 self.quitting = True
929 self.stop_trace()
930
931 def runctx(self, cmd, globals, locals):
932 """For backwards-compatibility. Defers to run()."""

Callers 2

runevalFunction · 0.80
test_runeval_stepMethod · 0.80

Calls 3

resetMethod · 0.95
start_traceMethod · 0.95
stop_traceMethod · 0.95

Tested by 1

test_runeval_stepMethod · 0.64