diff options
author | Guido van Rossum <guido@python.org> | 1998-10-15 12:18:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-10-15 12:18:49 (GMT) |
commit | b7ffca393f3e00dc98c04a689ab6d11d968cc650 (patch) | |
tree | 539d53b66e25b68b34505235d6ec9dd750b85b42 /Tools/idle | |
parent | 0e56568a0da17ee026a763cf3511d052613abda0 (diff) | |
download | cpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.zip cpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.tar.gz cpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.tar.bz2 |
Don't show function name if there is none
Diffstat (limited to 'Tools/idle')
-rw-r--r-- | Tools/idle/Debugger.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/idle/Debugger.py b/Tools/idle/Debugger.py index a292b4c..a65703f 100644 --- a/Tools/idle/Debugger.py +++ b/Tools/idle/Debugger.py @@ -69,7 +69,9 @@ class Debugger(bdb.Bdb): file = code.co_filename base = os.path.basename(file) lineno = frame.f_lineno - message = "%s:%s: %s()" % (base, lineno, code.co_name) + message = "%s:%s" % (base, lineno) + if code.co_name != "?": + message = "%s: %s()" % (message, code.co_name) self.status.configure(text=message) if info: type, value, tb = info |