This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients ppperry, terry.reedy
Date 2015-11-27.19:40:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448653218.52.0.811049848983.issue25733@psf.upfronthosting.co.za>
In-reply-to
Content
I believe startup files are compiled in PyShell.py, line 649 (3.x)
        try:
            code = compile(source, filename, "exec")
        except (OverflowError, SyntaxError):

and editor code is compiled in ScriptBinding.py, line 100
        try:
            # If successful, return the compiled code
            return compile(source, filename, "exec")
        except (SyntaxError, OverflowError, ValueError) as value:

Adding SystemError to the tuple is trivial.  I just need to test to verify.  (Side note: I think the tuple should be the same for both.  The reasons for entries other than SyntaxError should be documented.  ValueError when compiling?)

I believe that interactive input is forwarded to stdlib code.InteractiveInterpreter in PyShell.py, line 679
    try:
        # InteractiveInterpreter.runsource() calls its runcode() method,
        # which is overridden (see below)
        return InteractiveInterpreter.runsource(self, source, filename)

The compile call and error catching is inside Lib/code.py, line 57.
        try:
            code = self.compile(source, filename, symbol)
        except (OverflowError, SyntaxError, ValueError):

It should be fixed here.
History
Date User Action Args
2015-11-27 19:40:18terry.reedysetrecipients: + terry.reedy, ppperry
2015-11-27 19:40:18terry.reedysetmessageid: <1448653218.52.0.811049848983.issue25733@psf.upfronthosting.co.za>
2015-11-27 19:40:18terry.reedylinkissue25733 messages
2015-11-27 19:40:18terry.reedycreate