Message406287
Python 3.10 and 3.11:
>>> sum[i for i in [1, 2, 3] if i%2==0]
File "<stdin>", line 1
sum[i for i in [1, 2, 3] if i%2==0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
Furthermore, I don't find that highlighting the entire statement (or parts of it, if we use print(sum[...]) is very useful in attempting to find the source of the error.
In previous versions, we would get the following:
>>> sum[i for i in [1, 2, 3] if i%2==0]
File "<stdin>", line 1
sum[i for i in [1, 2, 3] if i%2==0]
^
SyntaxError: invalid syntax |
|
Date |
User |
Action |
Args |
2021-11-13 17:00:06 | aroberge | set | recipients:
+ aroberge, lys.nikolaou, pablogsal |
2021-11-13 17:00:06 | aroberge | set | messageid: <1636822806.1.0.227872215707.issue45801@roundup.psfhosted.org> |
2021-11-13 17:00:06 | aroberge | link | issue45801 messages |
2021-11-13 17:00:05 | aroberge | create | |
|