PSA: a semicolon bug cost a guy 2 days, and it changed how I read error messages
I was messing around with a tiny Python script to track my gas money and it kept failing on line 12 even though the line looked fine to me. Turned out I had mixed up a colon and a semicolon, and the error message was pointing at the wrong spot the whole time, which I learned from a 10 minute read on a site called Real Python. Does anyone else have a go-to trick for spotting those tiny typos when the error points somewhere else?
Colon vs semicolon trips people up way more than it should honestly. What I want to know is when you went back and stared at line 12, what finally made you see it? Were you comparing it to a working line right above it, or did the Real Python article show you the exact spot? Because in my experience the answer is usually you have to retype the whole line by hand instead of just looking at it. Your eyes skip right over a tiny dot when you already read it once and decided it was fine. So did you fix it by retyping or did something in the article actually teach you a system for catching it?