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 gvanrossum, lys.nikolaou, mdk, pablogsal, terry.reedy, vstinner
Date 2021-01-15.01:52:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610675569.21.0.449297851064.issue42827@roundup.psfhosted.org>
In-reply-to
Content
In order to test code.InteractiveCompiler (used by IDLE) and codeop._maybe_compile (which IC calls), which calls compile() 3 times with mode 'single', I entered the example as 2 or 3 lines in Shell.
>>> [file for str(file) in []  # Error highlight on 's'.
 ]
SyntaxError: cannot assign to function call

Breaking the expression elsewhere, including before 'str', gives the same message and highlighted 's'.

I did not test before recompiling but it is certainly correct now.
History
Date User Action Args
2021-01-15 01:52:49terry.reedysetrecipients: + terry.reedy, gvanrossum, vstinner, mdk, lys.nikolaou, pablogsal
2021-01-15 01:52:49terry.reedysetmessageid: <1610675569.21.0.449297851064.issue42827@roundup.psfhosted.org>
2021-01-15 01:52:49terry.reedylinkissue42827 messages
2021-01-15 01:52:49terry.reedycreate