You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> [x for x, y in [[1,2], [2,3]]]
ERROR: ParseError:# Error @ REPL[10]:1:9
[x for x, y in [[1,2], [2,3]]]
# └ ── invalid iteration spec: expected one of `=` `in` or `∈`
Stacktrace:
[1] top-level scope
@ none:1
the suggestion seems off because the in is already there, it should somehow hint you to the right direction e.g. putting (x, y).
Actually, but maybe this is controversial, a syntax like this seems good to me, and maybe it could be allowed, in Python it works both with and without parenthesis and also in Julia x, y = [2, 3] already works so it seems good for consistency.
The text was updated successfully, but these errors were encountered:
Tortar
changed the title
Improve error message when unpacking in loop is built without paranthesis
Improve error message when unpacking in loop misses parentheses
May 1, 2024
Now:
the suggestion seems off because the
in
is already there, it should somehow hint you to the right direction e.g. putting(x, y)
.Actually, but maybe this is controversial, a syntax like this seems good to me, and maybe it could be allowed, in Python it works both with and without parenthesis and also in Julia
x, y = [2, 3]
already works so it seems good for consistency.The text was updated successfully, but these errors were encountered: