patma icon indicating copy to clipboard operation
patma copied to clipboard

Consider adding an 'else:' clause

Open gvanrossum opened this issue 3 years ago • 3 comments

Several SC members seem to be in favor of adding an else: clause. I didn't see anyone express a preference for the indentation (align with match or case?) but if we adopted the alternative indentation scheme (#144) this would be resolved.

I could live with this (especially if it was aligned with case).

gvanrossum avatar Aug 26 '20 16:08 gvanrossum

Since I have probably been one of the most vocal about the indentation of else:: if this is the only thing that stands in our way to make a lot of people happy who really want to have an else:, then I completely withdraw any objections concerning indenting it on the level of case: (I still think it's "wrong", but to be honest, I don't need the else:, anyway :wink:).

Tobias-Kohn avatar Aug 26 '20 17:08 Tobias-Kohn

In our VC with the SC (the SC-VC), we ended up agreeing this was not needed.

gvanrossum avatar Sep 16 '20 04:09 gvanrossum

Labeling rejected (we're not adding 'else:') and fully pepped (this is addressed in PEP 635: under "Wildcard Pattern", search for "Else blocks."

gvanrossum avatar Oct 20 '20 17:10 gvanrossum