[Python-Dev] Switch and static, redux (original) (raw)

Giovanni Bajo rasky at develer.com
Fri Jul 7 09:35:42 CEST 2006


Guido van Rossum <guido at python.org> wrote:

So, my proposal is to give up on static, accept PEP 3103 with the following options: - Syntax alternative 2+B (unindented cases, 'case in ...' for multiple cases). - Semantics option 3 (def-time freezing)

I know it's only a bikeshed issue here, but wouldn't it be the first case where a statement ending with ":" does not introduce an indented suite? Is it really worth to create this non-orthogonality in the language?

IMHO, if we went for indentend cases, we could teach editors to indent cases only 1 or 2 spaces. That would preserve orthogonality of the language, and allow not to consume too much horizontal space.

Or, what about optionally indented cases? That is, allow both forms as correct syntax. It would make it just a matter of style at that point (and Python will finally have its first religious wars over indentation.... AT LAST! :)

Giovanni Bajo



More information about the Python-Dev mailing list