F
21

Spent 3 hours on a missing semicolon in my first Python script

I was building a simple number guesser and kept getting a syntax error that made no sense. I checked my loops and variables, but the whole issue was a missing semicolon on line 7 that my text editor didn't flag. How do you guys spot tiny mistakes like that faster?
3 comments

Log in to join the discussion

Log In
3 Comments
craig.parker
Python doesn't even use semicolons though.
3
cora_west5
Yeah but you can still use them if you want, right? Like it's optional. I mean, why even have it as an option if it's not needed? Seems weird to include a thing the language doesn't actually require. Maybe it's just me but that feels like clutter.
6
nathan_kim
Actually saw a talk once where Guido said they kept semicolons for one-liners. Like when you're messing around in the shell and want to cram a few commands on a single line.
6