Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:skip:s 10': 0.05; 'line:': 0.07; 'different,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'wrote:': 0.17; 'received:209.85.214.174': 0.21; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'false': 0.35; 'problem,': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'others.': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mx8HrVbVP0AWQenug5nK8Mv0eFCG6MO+mAK/fUigc/k=; b=C0A/VSmofOEPXCU8BbQs4IEhaY26f+v7neI1jregR49eTcsZrTPNAjE1i7EDq8XLGU knwBCVOrVCPuA9J8Bq5CeEcNGT/9gKc0F9jfdE93uCXQbxsi+OJxDmXciUwGqp0oNa7/ z0Vk9JoN8QOxMMhvTV0UHORA4EtPVTwZVzh/u7AfbHCCbQzOQWnlwLbfRp8q7QBebf8E fqCadL9oGRcpiiJmH5FUcIk7+WMDXSHSdRqI4ACWK6G5W27KHPVtYulIp+C1FmP1+ore 1UkxTd79GhohxcEeUkLy/lO9I1hvFa+Ez/jkyMJGgZQ4liyW5VW60bt9+6FNJTu0z0GI zaww== MIME-Version: 1.0 In-Reply-To: <508CDAF1.3010703@bluewin.ch> References: <508c810f$0$29967$c3e8da3$5496439d@news.astraweb.com> <508CDAF1.3010703@bluewin.ch> Date: Sun, 28 Oct 2012 21:44:40 +1100 Subject: Re: attaching names to subexpressions From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351421084 news.xs4all.nl 6964 [2001:888:2000:d::a6]:50754 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32309 On Sun, Oct 28, 2012 at 6:12 PM, F.R. wrote: > > How about: > > line = True > while line: > > line = function(x, y, z) > do something with(line) > > ? That's going to go through the body of the loop with a false line before breaking out. In some situations that's not a problem, but it's distinctly different, so it's not a drop-in replacement for the others. ChrisA