Message298096
Before Python runs your code, it compiles it to byte-code. A SyntaxError means that the code cannot be compiled, and so it does not run.
So the SyntaxError is raised *before* any of the code runs, and standard error is not re-directed. This is expected behaviour, not a bug. You cannot catch compile-time errors at run-time. |
|
Date |
User |
Action |
Args |
2017-07-11 01:16:40 | steven.daprano | set | recipients:
+ steven.daprano, George Gillan |
2017-07-11 01:16:40 | steven.daprano | set | messageid: <1499735800.63.0.899225940023.issue30894@psf.upfronthosting.co.za> |
2017-07-11 01:16:40 | steven.daprano | link | issue30894 messages |
2017-07-11 01:16:39 | steven.daprano | create | |
|