Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69621
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Yet Another Switch-Case Syntax Proposal |
| Date | 2014-04-04 00:03 +0100 |
| References | <12008-1396450399-453900@sneakemail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8866.1396566240.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Yet Another Switch-Case Syntax Proposal Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-04 00:03 +0100
csiph-web