Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
Python 3.10.5
New SyntaxError ^ pointer 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
edit: added triple backquotes to preserve formatting on github. thanks hauntsaninja.
On 3.10.5 it is pointing on the ":" prior to lambda, while on 3.8 it is pointing on the missing comma.