I would have expected an error.

Julia:

julia> VERSION
v"0.4.0-rc1"

julia> x = [1:5;];

julia> x[], x[1]
(1,1)

Python:

>>> x = range(1, 6)
>>> x[]
  File "<stdin>", line 1
    x[]
      ^
SyntaxError: invalid syntax


Reply via email to