New GitHub issue #94192 from Serpens66:<br>

<hr>

<pre>
Python 3.10.5

New SyntaxError description is misleading in following example compared to older python versions.

`d = {
    "foo":"foo",
    "bar":lambda b:{"bar":testfn(von="1"b=b)}, 
    }`

Results in error message on 3.10.5:
>   File "test.py", line 3
>     "bar":lambda b:{"bar":testfn(von="1"b=b)},
>          ^
> SyntaxError: expression expected after dictionary key and ':'

While on python 3.8 it was more helpful:
>   File "test.py", line 3
>     "bar":lambda b:{"bar":testfn(von="1"b=b)},
>                                         ^
> SyntaxError: invalid syntax

(the formatting of this "^" seems to be not correct here at github. On 3.10.5 it is pointing on ":", while on 3.8 it is pointing on the missing comma)

</pre>

<hr>

<a href="https://github.com/python/cpython/issues/94192">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>