New submission from Terry J. Reedy <tjre...@udel.edu>:
In 3.6.6, """compile("assert (0, 'bad')", '', 'single')""" in Python or IDLE emits "SyntaxWarning: assertion is always true, perhaps remove parentheses?". In Python, >>> assert (0, 'bad') <stdin>:1: SyntaxWarning: assertion is always true, perhaps remove parentheses? In IDLE's Shell, the same statement is effectively treated as incomplete in that newlines are echoed and IDLE waits for input until something is entered. KeyboardInterrupt (^C) or any text terminate the loop. In the latter case, "SyntaxError: multiple statements found while compiling a single statement" is printed. In a file, the statement has no effect, but the warning should be printed in the shell. ---------- assignee: terry.reedy components: IDLE messages: 326745 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: SyntaxWarning not handled properly type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34857> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com