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


Groups > comp.lang.python > #32309

Re: attaching names to subexpressions

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 <rosuav@gmail.com>
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 <a533d812-480e-479b-9210-7097c2d70d73@a4g2000pbo.googlegroups.com> <mailman.2934.1351343030.27098.python-list@python.org> <508c810f$0$29967$c3e8da3$5496439d@news.astraweb.com> <CABicbJ+gGGFv2B2okkW+x1HCmzOHF48m0cVykyAn_BW=720FOw@mail.gmail.com> <508CDAF1.3010703@bluewin.ch>
Date Sun, 28 Oct 2012 21:44:40 +1100
Subject Re: attaching names to subexpressions
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2966.1351421084.27098.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sun, Oct 28, 2012 at 6:12 PM, F.R. <anthra.norell@bluewin.ch> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

attaching names to subexpressions Steve Howell <showell30@yahoo.com> - 2012-10-26 19:42 -0700
  Re: attaching names to subexpressions Gelonida N <gelonida@gmail.com> - 2012-10-27 15:03 +0200
    Re: attaching names to subexpressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-28 00:49 +0000
      Re: attaching names to subexpressions rusi <rustompmody@gmail.com> - 2012-10-27 18:57 -0700
      Re: attaching names to subexpressions Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-28 01:57 -0400
        Re: attaching names to subexpressions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-28 06:59 +0000
          Re: attaching names to subexpressions Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-28 04:12 -0400
        Re: attaching names to subexpressions Neil Cerutti <neilc@norwich.edu> - 2012-10-29 11:53 +0000
      Re: attaching names to subexpressions Chris Angelico <rosuav@gmail.com> - 2012-10-28 17:01 +1100
      Re: attaching names to subexpressions "F.R." <anthra.norell@bluewin.ch> - 2012-10-28 08:12 +0100
      Re: attaching names to subexpressions Chris Angelico <rosuav@gmail.com> - 2012-10-28 21:44 +1100

csiph-web