Curlies or Lisp-like curves play a ton nicer with tooling and visual inspection.
Curlies or Lisp-like curves play a ton nicer with tooling and visual inspection.
It's an ambiguity problem similar to the dangling else. There's no way to automatically tell the editor that I want the statements to go here or there.
edit: Yes, there's a reformat command in emacs. No, it does not work correctly for Python, because the lack of delimiters means it does not have the information it needs to do the job right.
If it were an actual grammatical ambiguity, any editor couldn't get it right but it can't be since the Python parser can understand it.
Here's a pastebin that illuminates the problem.
edit: What version of emacs are you using? Are you using python.el or python-mode.el for editing Python? python.el handles try/except, if/else, etc., etc., indentation pretty marvelously.
edit2: If you'd rather talk about this out-of-band I'm on freenode as mdeboard or my email address is in my profile.