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


Groups > comp.lang.python > #49127

Re: Is this PEP-able? fwhile

References (2 earlier) <kqajj8$54h$1@dont-email.me> <mailman.3788.1372116912.3114.python-list@python.org> <kqam8g$f7n$1@dont-email.me> <CAA=1kxR0sMf2MT-UniaVsEY9pUhc0Tvq+O2aHc6ZBY=Gjt1hOg@mail.gmail.com> <CAM32KhohO7rNNLS+1S=LKkbPziXEBJQksqt4KW3oEAijaUot5Q@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2013-06-24 22:50 -0600
Subject Re: Is this PEP-able? fwhile
Newsgroups comp.lang.python
Message-ID <mailman.3798.1372135909.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Jun 24, 2013 at 6:41 PM, wu wei <wuwei23@gmail.com> wrote:
> It's still possible by raising a StopIteration within the condition
> function:
>
>     def is_part_of_header(x):
>         if header_condition:
>             return True
>         else:
>             raise StopIteration

Which is basically just taking the break and moving it to somewhere
else in the code, and meanwhile rendering the is_part_of_header
function non-reusable.

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


Thread

Re: Is this PEP-able? fwhile Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-24 14:12 -0600
  Re: Is this PEP-able? fwhile alex23 <wuwei23@gmail.com> - 2013-06-25 09:14 +1000
    Re: Is this PEP-able? fwhile Fábio Santos <fabiosantosart@gmail.com> - 2013-06-25 00:35 +0100
      Re: Is this PEP-able? fwhile alex23 <wuwei23@gmail.com> - 2013-06-25 10:00 +1000
        Re: Is this PEP-able? fwhile Fábio Santos <fabiosantosart@gmail.com> - 2013-06-25 01:19 +0100
        Re: Is this PEP-able? fwhile wu wei <wuwei23@gmail.com> - 2013-06-25 10:41 +1000
        Re: Is this PEP-able? fwhile Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-24 22:50 -0600
    Re: Is this PEP-able? fwhile rusi <rustompmody@gmail.com> - 2013-06-24 23:04 -0700

csiph-web