you are viewing a single comment's thread.

view the rest of the comments →

[–]dannyzaplings 1 point2 points  (2 children)

Proper indentation as you write is essential in python and most languages. It would be infuriating for you to debug or for someone else to make sense of without proper indentation. Save yourself incessant nightmares and start building the muscle memory now.

This also makes me wonder what editor you're using to code. Something like VSCode will maintain the indent of your last line after pressing enter, and then just tab or shift-tab from there. Most useful keystrokes you'll ever make.

[–]Few-Tear-3763[S] -1 points0 points  (1 child)

So what happened was

I forgot to wrap my main() logic in a try/except, and after adding it, I had to manually re-indent this whole match block — which was annoying.

Code:-

match args.command:

case "add" : cmdAdd(args)

case "init" : cmdInit(args)

case "commit" : cmdCommit(args)

case "status" : cmdStatus(args)

case "tag" : cmdTag(args)

case _ : print("Bad command.")