8
Just found out Python's "pass" statement is for empty code blocks, I've been using it as a placeholder for 2 years
Was reading the official docs last Tuesday and realized I coulda just used comments or ellipses the whole time, so has anyone else been doing this wrong or am I the only one who thought it was a universal filler?
1 comments
Log in to join the discussion
Log In1 Comment
wright.dakota10d ago
Man, I feel this so hard. I spent a whole semester using "pass" in every single function I stubbed out because I thought it was the only way to keep the code from crashing, turns out I could've just put an ellipsis and moved on... like, now I look back at my old projects and cringe at all the pointless "pass" lines sitting there doing nothing. It's kind of embarrassing how long it took me to actually read the part of the docs that explains what it's for.
4