Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69621 > unrolled thread

Re: Yet Another Switch-Case Syntax Proposal

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2014-04-04 00:03 +0100
Last post2014-04-04 00:03 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Yet Another Switch-Case Syntax Proposal Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-04 00:03 +0100

#69621 — Re: Yet Another Switch-Case Syntax Proposal

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-04-04 00:03 +0100
SubjectRe: Yet Another Switch-Case Syntax Proposal
Message-ID<mailman.8866.1396566240.18130.python-list@python.org>
On 02/04/2014 15:53, Lucas Malor wrote:
> Hi all. I would proposeto you all a switch-case syntax for Python. I already read PEP 3103 and I'm not completely satisfied by any of the proposed solutions. This is my proposal:
>
> switch_stmt ::=  "switch" identifier "case" expression_list ":" suite
>      ("case" expression_list ":" suite)*
>      ["else" ":" suite]
>
> or, more simply:
>
>
>
> switch x case var1:
>      ....
> case var2:
>      ...
> case var3:
>      ...
> else:
>      ...
>

Please don't take this personally, but there's more chance of me being 
the first ever World President than of anybody getting a switch/case 
statement past the BDFL.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web