summaryrefslogtreecommitdiffstats
path: root/Tools/idle/Debugger.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-15 12:18:49 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-15 12:18:49 (GMT)
commitb7ffca393f3e00dc98c04a689ab6d11d968cc650 (patch)
tree539d53b66e25b68b34505235d6ec9dd750b85b42 /Tools/idle/Debugger.py
parent0e56568a0da17ee026a763cf3511d052613abda0 (diff)
downloadcpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.zip
cpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.tar.gz
cpython-b7ffca393f3e00dc98c04a689ab6d11d968cc650.tar.bz2
Don't show function name if there is none
Diffstat (limited to 'Tools/idle/Debugger.py')
-rw-r--r--Tools/idle/Debugger.py4
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