14
Spent 3 hours debugging a missing semicolon in my first Python script
I was sitting at my kitchen table last Tuesday trying to follow along with a YouTube tutorial on loops. My code kept throwing a syntax error and I couldn't figure out why. After like 45 minutes of re-reading the tutorial and checking my indentation, I finally copied the whole thing into a fresh file. Turns out I had typed a semicolon at the end of a line from muscle memory with JavaScript. I literally laughed at myself for 2 minutes straight. Has anyone else gotten tripped up by mixing up syntax between languages they're learning?
2 comments
Log in to join the discussion
Log In2 Comments
haydenburns21h ago
Three hours though? Feels like you might be overcomplicating it a bit. A missing semicolon in Python is pretty easy to spot since the error message literally tells you the line number. But I guess if you're switching back and forth between JS and Python it's easy to forget which one uses them. Still, muscle memory stuff like that usually goes away after a week or two of sticking with one language. Not saying it didn't happen but maybe take a breath and look at the error next time before copying everything over.
10
lunah8620h ago
Oh man, I once spent an hour debugging a missing colon. We've all been there!
9