Message255478
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. |
|
Date |
User |
Action |
Args |
2015-11-27 19:40:18 | terry.reedy | set | recipients:
+ terry.reedy, ppperry |
2015-11-27 19:40:18 | terry.reedy | set | messageid: <1448653218.52.0.811049848983.issue25733@psf.upfronthosting.co.za> |
2015-11-27 19:40:18 | terry.reedy | link | issue25733 messages |
2015-11-27 19:40:18 | terry.reedy | create | |
|