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


Groups > comp.lang.python > #32309

Re: attaching names to subexpressions

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 2012-10-28 21:44 +1100
Subject Re: attaching names to subexpressions
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2966.1351421084.27098.python-list@python.org> (permalink)

Show all headers | 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