Author terry.reedy
Recipients JDLH, eryksun, terry.reedy
Date 2017-02-18.02:29:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If src is effectively blank, compile(src, filename, mode) raises SyntaxError if mode is 'single' but not if it is 'exec'.  I believe IDLE compiles with 'single', but it has the behavior Jim (and I) expect and consider correct, printing '>>>' after effectively blank lines.  This is because IDLE uses code.InteractiveInterpreter, which uses codeop.compile_command, which uses codeop._maybe_compile, which replaces effectively blank statements with 'pass'.  compile('pass', '', 'single') returns a do-nothing code object.  The C-coded interactive interpreter is doing something else.
Date User Action Args
2017-02-18 02:29:25terry.reedysetrecipients: + terry.reedy, eryksun, JDLH
2017-02-18 02:29:24terry.reedysetmessageid: <>
2017-02-18 02:29:24terry.reedylinkissue29561 messages
2017-02-18 02:29:24terry.reedycreate