Lambdas in comprehensions need parentheses in Python > 3.8

Fixes https://github.com/davidhalter/jedi/issues/1824.
This commit is contained in:
Peter Law
2021-12-12 18:16:46 +00:00
parent 3602c10916
commit 72cf41f4c9

View File

@@ -110,4 +110,4 @@ class Test(object):
# nocond lambdas make no sense at all.
#? int()
[a for a in [1,2] if lambda: 3][0]
[a for a in [1,2] if (lambda: 3)][0]