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 terry.reedy
Date 2018-09-30.20:10:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538338230.46.0.545547206417.issue34857@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-09-30 20:10:30terry.reedysetrecipients: + terry.reedy
2018-09-30 20:10:30terry.reedysetmessageid: <1538338230.46.0.545547206417.issue34857@psf.upfronthosting.co.za>
2018-09-30 20:10:30terry.reedylinkissue34857 messages
2018-09-30 20:10:30terry.reedycreate