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


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

Re: Yet Another Switch-Case Syntax Proposal

Started byMRAB <python@mrabarnett.plus.com>
First post2014-04-04 03:04 +0100
Last post2014-04-04 03:04 +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 MRAB <python@mrabarnett.plus.com> - 2014-04-04 03:04 +0100

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

FromMRAB <python@mrabarnett.plus.com>
Date2014-04-04 03:04 +0100
SubjectRe: Yet Another Switch-Case Syntax Proposal
Message-ID<mailman.8873.1396577056.18130.python-list@python.org>
On 2014-04-03 19:23, Ethan Furman wrote:
> On 04/03/2014 09:02 AM, Lucas Malor wrote:
>>
>> In reply to Ian Kelly:
>>>
>>> Instead of disabling fallthrough by default, why not disable it all together?
>>
>> I was tempted but there are cases in which it's useful. An example
>>
>> switch day casein ("Monday", "Thursday", "Wednesday", "Tuesday", "Friday"):
>>      gotowork = True
>>      continue
>> casein ("Monday", "Thursday", "Wednesday", "Tuesday", "Friday"):
>>      daytype = "ferial"
>> casein ("Saturday", "Sunday")
>>      daytype = "festive"
>
>
> Absolutely not.  Currently, the 'continue' key word means "stop processing and go back to the beginning".  You would
> have it mean "keep going forward".  Thus 'continue' would mean both "go backwards" and "go forwards" and would lead to
> unnecessary confusion.
>
I thought it went to the end of the loop, but because it's a loop, it
just wraps around back to the top...

[toc] | [standalone]


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


csiph-web