Terry J. Reedy <tjre...@udel.edu> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42827>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to