]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't show function name if there is none
authorGuido van Rossum <guido@python.org>
Thu, 15 Oct 1998 12:18:49 +0000 (12:18 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 15 Oct 1998 12:18:49 +0000 (12:18 +0000)
Tools/idle/Debugger.py

index a292b4c7860f5db01a7aaf8b4de46564da6bd154..a65703f1a9fda137d913adb541ced38359379927 100644 (file)
@@ -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