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


Groups > comp.lang.python > #49127

Re: Is this PEP-able? fwhile

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.048
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'else:': 0.03; 'subject:PEP': 0.07; 'function:': 0.09; 'def': 0.12; '24,': 0.16; 'meanwhile': 0.16; 'wei': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'code,': 0.22; 'mon,': 0.24; 'somewhere': 0.26; 'header:In-Reply- To:1': 0.27; 'function': 0.29; 'raise': 0.29; 'message- id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'raising': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'moving': 0.39; 'to:addr:python.org': 0.39; 'subject:? ': 0.60; 'break': 0.61; 'skip:n 10': 0.64; 'taking': 0.65; 'within': 0.65; 'rendering': 0.68; 'subject:this': 0.83; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=m6VEtCbLykGd3aXLmsUB0+1NqklcwFZGg+7TfBdF/bU=; b=ejQuOEATH1Nsz2n7oAF7odfIFu6KYe6haxeT29GF5smRHZP4GNZT5XeZ1fDNyOKmG5 ZbtHxaAkX0bCfiviTLnV1Ij3MCSUFBLfi7l7Zw7Skb9jQNoSlsFpMrxa8Up5BFVmsAmt z/H+AfCalgaugMsfylvfpJVDRAhyxzGgFLO+U+cVMrZZNYD/D9MxfeEK/2QhMdpe4UQk bZziOVMpZM87+L/BVzDCczS085TlzVGszMX4+LF9HlBfum7mPj0c0CxCJFfTB4FhHeN/ s7p+qhuF4UXB9vakeL+R7YIxxXHpfyEHiV5h9Lc1EyDztQSqbd+zk0OREMdM7W2z3V2W ZpTQ==
X-Received by 10.66.146.9 with SMTP id sy9mr31120198pab.16.1372135899683; Mon, 24 Jun 2013 21:51:39 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAM32KhohO7rNNLS+1S=LKkbPziXEBJQksqt4KW3oEAijaUot5Q@mail.gmail.com>
References <8D03F2B8CF0E7BE-1864-1796B@webmail-m103.sysops.aol.com> <mailman.3760.1372104769.3114.python-list@python.org> <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 Mon, 24 Jun 2013 22:50:59 -0600
Subject Re: Is this PEP-able? fwhile
To Python <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.3798.1372135909.3114.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372135909 news.xs4all.nl 15885 [2001:888:2000:d::a6]:46690
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49127

Show key headers only | 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