Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: for / while else doesn't make sense Date: Fri, 20 May 2016 19:57:07 -0400 Organization: IISS Elusive Unicorn Lines: 26 Message-ID: References: <573dfc0f$0$1586$c3e8da3$5496439d@news.astraweb.com> <573e54f7$0$1615$c3e8da3$5496439d@news.astraweb.com> <5o8vjb1rlgj46i5jumk7p80nej3cq4jgn4@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 9hFn6rV8HjSVTybqp6qRugI4VH30LdbxBguRICU26TBQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:while': 0.09; 'exception': 0.13; '":"': 0.16; '"for"': 0.16; '"if"': 0.16; '2016': 0.16; 'conditional': 0.16; 'fallback': 0.16; 'keyword,': 0.16; 'nominate': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'url:home': 0.18; 'code.': 0.23; 'replacing': 0.23; 'second': 0.24; 'header:X -Complaints-To:1': 0.26; 'fri,': 0.27; 'found.': 0.27; 'sequence': 0.27; 'code': 0.30; "i'll": 0.33; 'case,': 0.34; 'languages': 0.34; 'something': 0.35; 'expected': 0.35; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'stuff': 0.38; 'to:addr:python.org': 0.40; 'subject: / ': 0.63; 'different': 0.63; 'sound': 0.72; '(utc),': 0.84; 'subject:else': 0.84; 'subject:sense': 0.84; '-0000': 0.91; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-73-117-91.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <5o8vjb1rlgj46i5jumk7p80nej3cq4jgn4@4ax.com> X-Mailman-Original-References: <573dfc0f$0$1586$c3e8da3$5496439d@news.astraweb.com> <573e54f7$0$1615$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:108874 On Fri, 20 May 2016 11:55:34 -0000 (UTC), Jon Ribbens declaimed the following: > >I would find that very confusing. "then:" makes it sound like >executing that block is the usual case, when in practice it is >usually the exception - the fallback code if the expected value >was not found. And I'll second that... In those languages that use "then" as a keyword, it separates the "if" conditional from the "true" block of code. Or -- visualize replacing the ":" on the "for" with the word "then" for x in sequence then do stuff with x else do something with no x If a different keyword is to be introduced, I nominate "otherwise" -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/