Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: for / while else doesn't make sense Date: Wed, 15 Jun 2016 13:41:01 -0400 Lines: 16 Message-ID: References: <9e7b6ded-15ad-490a-9842-b3da5d8a048d@googlegroups.com> <575d3430$0$11108$c3e8da3@news.astraweb.com> <575e167a$0$1608$c3e8da3$5496439d@news.astraweb.com> <575f6f58$0$1591$c3e8da3$5496439d@news.astraweb.com> <036dbf77-9483-4c71-a86b-f03cbf55cc3b@googlegroups.com> <5760c795$0$1609$c3e8da3$5496439d@news.astraweb.com> <26329884-d598-4f32-87b8-d75a3d109d20@googlegroups.com> <1465998697.330207.638463505.7EA18520@webmail.messagingengine.com> <97fd5175-0cc4-449d-a56d-bf7e238cbea3@googlegroups.com> <1466012461.379166.638733945.4672088E@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 0bG1oFAyIdoPvdk8R2gT2wr9PqrhqV+xXlxMdzHq+qKw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'logic': 0.09; 'received:internal': 0.09; 'subject:while': 0.09; 'exception': 0.13; 'wed,': 0.15; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:compute4.internal': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'subject:make': 0.16; 'wrote:': 0.16; '(in': 0.18; 'all,': 0.20; 'stephen': 0.22; 'defined': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'question': 0.27; '15,': 0.30; 'statement': 0.32; 'run': 0.33; 'michael': 0.33; 'jump': 0.33; 'case,': 0.34; 'should': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'presence': 0.38; 'received:66': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'skip:u 10': 0.61; 'header:Message-Id:1': 0.61; 'skip:n 10': 0.62; 'subject: / ': 0.63; 'subject:else': 0.84; 'subject:sense': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=16/unSoLdqbMAdOiV4wtyFU0Yzo=; b=Qkd+xC YBtQHVabHz7vZ6dIGDZy0o5mcX1jlfGcIulP1y4J2079zvGSWDIQlwDjmWme4brM 4zw9tKgVtF9UM1EOyfxvfT7HyUHNJf/jUHF31oOz/S7O5agitoZn+1hfy6/rqYd+ 9Oq3o7jnbPR7/7QipRG4Ad8HObRQ9iYmXwYa4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=16/unSoLdqbMAdO iV4wtyFU0Yzo=; b=JxpkZzDouuMsycyxlVINyWyY/1/JVnVnT9TNY1326U0cXCF ZKiUGuYRR6EGj38hJW6Q19IY67BimSSB1sUT95ZnZ9NGlOnw2q/ZFP/Vs+3ZeY23 gSWag98zODMVoboUBKZm/xTJ9Qc447zMMBDY5OZDq6rbd3wOpz9i/7O0reMk= X-Sasl-Enc: /FGbswzVzFy8indRCxGNYN9Vl50Vv8kSIEdg5TwgacUI 1466012461 X-Mailer: MessagingEngine.com Webmail Interface - ajax-aff28cd1 In-Reply-To: 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: <1466012461.379166.638733945.4672088E@webmail.messagingengine.com> X-Mailman-Original-References: <9e7b6ded-15ad-490a-9842-b3da5d8a048d@googlegroups.com> <575d3430$0$11108$c3e8da3@news.astraweb.com> <575e167a$0$1608$c3e8da3$5496439d@news.astraweb.com> <575f6f58$0$1591$c3e8da3$5496439d@news.astraweb.com> <036dbf77-9483-4c71-a86b-f03cbf55cc3b@googlegroups.com> <5760c795$0$1609$c3e8da3$5496439d@news.astraweb.com> <26329884-d598-4f32-87b8-d75a3d109d20@googlegroups.com> <1465998697.330207.638463505.7EA18520@webmail.messagingengine.com> <97fd5175-0cc4-449d-a56d-bf7e238cbea3@googlegroups.com> Xref: csiph.com comp.lang.python:109987 On Wed, Jun 15, 2016, at 13:18, Michael Selik wrote: > On Wed, Jun 15, 2016, 10:28 AM Rustom Mody wrote: > > > Where did the question of "break can be written as goto" come from? > > > > Stephen said the "else" in for-else was "unconditional". He argued that > neither the presence nor absence of a break should be considered a > condition, because we don't consider the occurrence or non-occurrence of > an > exception (goto) as a condition of whether to run the else-clause. Okay... so why don't we consider the else in *if*-else unconditional? After all, the same logic applies: it only doesn't run if a statement defined to jump past it (in one case, the true part of the if statement - in the other case, a break) is run.