Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69604
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.049 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.01; 'currently,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; '~ethan~': 0.09; '"keep': 0.16; 'received:69.93': 0.16; 'subject:Case': 0.16; 'tempted': 0.16; 'wrote:': 0.18; 'example': 0.22; 'header:User-Agent:1': 0.23; 'switch': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'thus': 0.29; 'default,': 0.31; 'disable': 0.31; 'cases': 0.33; 'not.': 0.33; 'but': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'ian': 0.60; 'received:173': 0.61; 'back': 0.62; 'reply': 0.66; 'useful.': 0.68; 'day': 0.76; 'confusion.': 0.84; 'absolutely': 0.87; 'subject:Proposal': 0.91; 'lucas': 0.93 |
| Date | Thu, 03 Apr 2014 11:23:39 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Yet Another Switch-Case Syntax Proposal |
| References | <8084-1396540962-768613@sneakemail.com> |
| In-Reply-To | <8084-1396540962-768613@sneakemail.com> |
| Content-Type | text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator3304.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-BWhitelist | no |
| X-Source-IP | 173.12.184.233 |
| X-Exim-ID | 1WVmJJ-0006WH-4E |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| X-Source-Sender | ([173.12.184.233]) [173.12.184.233]:43547 |
| X-Source-Auth | ethan+stoneleaf.us |
| X-Email-Count | 2 |
| X-Source-Cap | dG9idWs7dG9idWs7Z2F0b3IzMzA0Lmhvc3RnYXRvci5jb20= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8852.1396550862.18130.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1396550862 news.xs4all.nl 2956 [2001:888:2000:d::a6]:59017 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:69604 |
Show key headers only | View raw
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.
--
~Ethan~
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Yet Another Switch-Case Syntax Proposal Ethan Furman <ethan@stoneleaf.us> - 2014-04-03 11:23 -0700
Re: Yet Another Switch-Case Syntax Proposal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-04 08:33 +0000
Re: Yet Another Switch-Case Syntax Proposal Marko Rauhamaa <marko@pacujo.net> - 2014-04-04 12:46 +0300
Re: Yet Another Switch-Case Syntax Proposal Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 10:02 -0600
Re: Yet Another Switch-Case Syntax Proposal Marko Rauhamaa <marko@pacujo.net> - 2014-04-04 19:44 +0300
Re: Yet Another Switch-Case Syntax Proposal Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-04 11:55 -0600
csiph-web