Ask Your Question

Revision history [back]

Error related to ellipsis has wrong line number.

I had some long code that boiled down to the following:

print("hello");
test_command = [0..1];
print("hello again");
for i in [0..3:
  print(i);

As you can see, the error is a missing closing bracket in line 4. But if you paste the above code into a file and load it, the Sage interpreter flags a syntax error in line 2, the first ellipsis in the program. As you can imagine, it took a lot of time to find the error because it was nowhere near the reported error location. Is this a bug?