0

The parser repeats the offending line and displays a little 'arrow' pointing at the earliest point in the line where the error was detected. The error is caused by (or at least detected at) the token _preceding_the arrow.

This screenshot is taken from Python Documentary. I wanted to know what does earliest point mean here? (I have marked it with a red line). Does it mean the first point where an error was detected?

3

Yes- specifically, not just the earliest point, but the earliest point on a line where the syntax error occurred.

  • Thanks! I wanted to upvote your answer but my low reputation on this site doesn't let me to do so. – GforOevOerD Mar 11 '15 at 20:06
  • No problem! There is at least one place where we all have a "low reputation" and no one there cares about what we think. ;) – Gary Mar 11 '15 at 20:08
1

Hey @GforOevOerD (forever good, I like that). Just to add to the answer by @Gary: the word "point" as you probably know by now has many meanings:

  • a point in space - "The point you see on this map is where the robbery took place."
  • a point in time - "I'll finish my homework at some point tonight."
  • an argument - "She made a valid point about hiring another person for the team."
  • purpose, reason - "There is no point in continuing with your lies - we know the truth."
  • etc

So "the earliest point in the line where the error was detected" means "the first location (i.e. character) in the line where the error was detected"

  • Thank you so much. This answer also helped me a lot. But i can't upvote your answer due to low points of reputation. – GforOevOerD Mar 13 '15 at 12:35
  • Haha that's OK - I'm not doing this for the points. – RuslanD Mar 13 '15 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.