[New-bugs-announce] [issue43748] Inconsistent grammar in new error message (introduced in 3.10.0a7)

Andre Roberge report at bugs.python.org
Tue Apr 6 08:24:08 EDT 2021

New submission from Andre Roberge <andre.roberge at gmail.com>:

Python version 3.10.0a7 added a more informative error message for:

>>> f"{**k}"
  File "<stdin>", line 1
SyntaxError: f-string: can't use double starred expression here

Previously, the message was simply "SyntaxError: invalid syntax".  So, this change is certainly a welcome addition.

However, as far as I can tell, starting with Python 3.8, all previous uses of "can't" in error messages were replaced by "cannot".  Although it is an extremely minor point, it might be preferable for consistency to replace "can't" by "cannot" in this new error message.

components: Interpreter Core
messages: 390323
nosy: aroberge
priority: normal
severity: normal
status: open
title: Inconsistent grammar in new error message (introduced in 3.10.0a7)
versions: Python 3.10

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list