New submission from JNCressey <j_n_cres...@live.co.uk>:
Compare f"{*my_tuple}" with f"{**my_dict}". Both are syntax errors since you can't use unpacking here, but the bug is as follows: - For the tuple, IDLE highlights the asterisk and has the helpful message 'SyntaxError: can't use starred expression here', - But for the dictionary, the first few characters of your code are highlighted, regardless of where the syntax error is located, and the message only says 'SyntaxError: invalid syntax'. Bug occurs in both 3.8.3 and 3.7.7, I haven't tested it in 3.6 nor in-development versions. ---------- assignee: terry.reedy components: IDLE messages: 371995 nosy: JNCressey, terry.reedy priority: normal severity: normal status: open title: IDLE highlights wrong place when code has syntax error of ** unpacking dict in f-string type: compile error versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41064> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com