Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Alternative indentation schemes #144

Open
gvanrossum opened this issue Aug 26, 2020 · 3 comments
Open

Alternative indentation schemes #144

gvanrossum opened this issue Aug 26, 2020 · 3 comments
Labels
fully pepped Issues that have been fully documented in the PEP rejected A rejected idea sc-feedback Issues raised in the steering committee feedback

Comments

@gvanrossum
Copy link
Owner

gvanrossum commented Aug 26, 2020

At least one SC member is in favor of one of the alternative indentation schemes that have been proposed. For example

match:
    <expr>
case <pattern>:
    <block>
...
[else:
    <block>]

A new variant was also proposed:

match:
    with <expr>
case <pattern>:
<etc.>

I can't say that I like the with <expr> variant, and other SC members don't either. But I could live with the first variant, which can also be written with match and <expr> on the same line:

match: <expr>
case <pattern>:
<etc.>

UPDATE: In any case, if we were to adopt this we should also add an else: clause -- there is no longer ambiguity about its placement, and at least one SC member prefers it over case _:.

@gvanrossum gvanrossum added the sc-feedback Issues raised in the steering committee feedback label Aug 26, 2020
@dmoisset
Copy link
Collaborator

1

@gvanrossum gvanrossum added fully pepped Issues that have been fully documented in the PEP rejected A rejected idea labels Sep 16, 2020
@gvanrossum
Copy link
Owner Author

In the SC-VC we ended up deciding to keep the existing indentation scheme.

@gvanrossum gvanrossum added needs more pep An issue which needs to be documented in the PEP and removed rejected A rejected idea labels Sep 16, 2020
@gvanrossum gvanrossum added rejected A rejected idea and removed needs more pep An issue which needs to be documented in the PEP labels Oct 20, 2020
@gvanrossum
Copy link
Owner Author

I think I meant to label this as rejected (we're not adopting any alternate schemes) and not longer needing more pep (it's being discussed in PEP 635).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fully pepped Issues that have been fully documented in the PEP rejected A rejected idea sc-feedback Issues raised in the steering committee feedback
Projects
None yet
Development

No branches or pull requests

2 participants