On 2020-07-16 17:37, Steve Holden wrote:
While I understand the point of view that says that match ... :
should encapsulate a sequence of indented suites, it seems to me that
match/case/case/.../else has a natural affinity with
try/except/except/.../finally/else, and nobody seems to think that the
excepts should be indented. Or the finally. And naturally the match/else
case are at the same indentation level, just as for/else, while/else and
try/finally. So why, exactly, should case be indented?
My apologies for being a Bear of Very Little Brain.
[snip]
For all other statement structures (if, while, try, etc.), the first
line ends with a colon and the second line is indented (and is a
statement). Therefore the cases should be indented.
However, for all other statement structures (if, while, try, etc.), the
other parts of the structure itself (elif, else, except, etc.) aren't
indented. Therefore the cases shouldn't be indented.
Either way, it's inelegant.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/4W2J5SLLOTLPMMFIZ4KTAC4THJMDCWBW/
Code of Conduct: http://python.org/psf/codeofconduct/