Open luoxzhg opened 1 year ago
I think that it can be a conflict with the following case.
This is only a bug if the behaviour contradicts the documentation. Does it?
CC @pablogsal
I think this is ambiguous and that's why we don't allow it. I will investigate it with more care to see what we can do
Ah if I recall correctly this is to not make it inconsistent with generator comprehensions where using them directly in a function call is ambiguous:
foo(x for (x,y) in X, Y)
Bug report
tuple without parenthesis in for statement is allowed
output
but in list comprehensions, it is SyntaxError
output
tuple comprehensions is same as this.
Your environment