Closed
Description
openedon Aug 7, 2018
If you enter an expression in REPL that terminates with a comma ,
then it is parsed immediately after newline , e.g.
julia> x = 1,
(1,)
julia> 1, 2, 3,
(1, 2, 3)
However in Julia script after ,
Julia tries to read continuation of the expression from a new line, e.g.
julia> function f()
1,
1, 2, 3
end
julia> f()
(1, 1, 2, 3)
This is inconsistent. The problem is apparent when you have a code and you copy paste it into REPL.
E.g. in the example above copy-pasting only the body of f()
into REPL produces:
julia> 1,
(1,)
julia> 1, 2, 3
(1, 2, 3)
I guess it is not intended as I would expect consistency between REPL?
I know that 100% consistency is not guaranteed - e.g. when multiple empty lines are present, but this case seems that it should give the same result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment