diff Lib/code.py @ 17666:12c80b570d00 legacy-trunk

InteractiveInterpreter.showsyntaxerror(): When replacing the exception object, be sure we stuff the new value in sys.last_value (which we already did for the original value).
author Fred Drake <fdrake@acm.org>
date Thu, 03 May 2001 04:58:49 +0000
parents 69f162dcd8b4
children d5acff178ad5
line wrap: on
line diff
--- a/Lib/code.py	Thu May 03 04:55:47 2001 +0000
+++ b/Lib/code.py	Thu May 03 04:58:49 2001 +0000
@@ -137,6 +137,7 @@
                 except:
                     # If that failed, assume SyntaxError is a string
                     value = msg, (filename, lineno, offset, line)
+                sys.last_value = value
         list = traceback.format_exception_only(type, value)
         map(self.write, list)