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


Groups > comp.lang.python > #7779

Re: break in a module

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ericsnowcurrently@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'handled': 0.03; 'subject:module': 0.04; 'francis': 0.07; '>>>>': 0.09; 'erik': 0.09; 'namespace': 0.09; 'pm,': 0.10; '>>>': 0.12; 'def': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'angelico': 0.16; 'frames': 0.16; 'keyword,': 0.16; 'looping': 0.16; 'return.': 0.16; '\xa0do': 0.16; '16,': 0.16; 'feedback.': 0.16; 'structures': 0.16; 'cc:addr :python-list': 0.17; 'received:74.125.82.44': 0.19; 'received :mail-ww0-f44.google.com': 0.19; 'header:In-Reply-To:1': 0.21; "aren't": 0.22; 'loop': 0.22; 'thu,': 0.22; "wasn't": 0.22; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'ones.': 0.23; 'stops': 0.23; 'fri,': 0.23; 'url:mailman': 0.26; 'message- id:@mail.gmail.com': 0.28; 'thanks': 0.28; 'anyway.': 0.29; 'functions.': 0.29; 'cc:addr:python.org': 0.30; 'url:listinfo': 0.30; 'module': 0.30; 'execution': 0.32; 'break': 0.33; 'rather': 0.34; '...': 0.34; 'chris': 0.34; 'there': 0.35; '"",': 0.35; '17,': 0.35; 'breaking': 0.35; 'ca,': 0.35; 'frame': 0.35; 'quite': 0.36; 'actual': 0.36; 'received:google.com': 0.37; 'case': 0.37; 'url:python': 0.38; 'received:74.125.82': 0.38; 'received:74.125': 0.38; 'url:org': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'current': 0.40; 'your': 0.60; 'plus': 0.65; 'bodies': 0.67; 'flow': 0.68; 'usa': 0.69; 'stand': 0.71; 'no:': 0.91; 'arab': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zp1ES+w/bZO3RNvPdEkNwOoMDU8roxEtQVoowtL+0DQ=; b=ozCXBC1hAtnsD9qYVg4jY7L9hYrqF+3a4pfIRhfiuXWhcUyc6SWBgzvU92hFFKbRVS rbLe4rVFMR8HGx9j1stF8x6d4wqAB6iV20FwyznZyJLL/FSMBTvQhF2HQXep2TY+XupA BA8b+45fZr5OPY4Ek1BuiNLdlgSEg/5qPlSXg=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=EO8WC6Hc1UWhz1Ibg/4ir4VnybDbD8h5hlOTTeE6nOP3UF+3nRgJJbFjhL3Sv/FgcT gX4ctTOX5UAUIdcyP6i1aDGbSCDWRygaLXEx31U6CuHJIBEihcITofppIe+qkIJWnZxt ml6BovzS1KHW6ELlaTkoCYMUwHaO+UBa6SVlM=
MIME-Version 1.0
In-Reply-To <VoednYBJ64pgDGfQnZ2dnUVZ5vCdnZ2d@giganews.com>
References <BANLkTinfUsHXuF5j5XjTMhiQXQKNi4ZSGA@mail.gmail.com> <4DF7E75E.9000907@mrabarnett.plus.com> <mailman.240.1308093309.11593.python-list@python.org> <qaWdnQmQzemLaWrQnZ2dnUVZ5vidnZ2d@giganews.com> <mailman.247.1308099095.11593.python-list@python.org> <6NWdnfBF0rgB42fQnZ2dnUVZ5h2dnZ2d@giganews.com> <mailman.45.1308266847.1164.python-list@python.org> <VoednYBJ64pgDGfQnZ2dnUVZ5vCdnZ2d@giganews.com>
Date Thu, 16 Jun 2011 18:00:31 -0600
Subject Re: break in a module
From Eric Snow <ericsnowcurrently@gmail.com>
To Erik Max Francis <max@alcyone.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.48.1308268834.1164.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 82.94.164.166
X-Trace 1308268835 news.xs4all.nl 49177 [::ffff:82.94.164.166]:53770
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7779

Show key headers only | View raw


On Thu, Jun 16, 2011 at 5:29 PM, Erik Max Francis <max@alcyone.com> wrote:
> Chris Angelico wrote:
>>
>> On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis <max@alcyone.com> wrote:
>>>
>>> It's quite consistent on which control structures you can break out of --
>>> it's the looping ones.
>>
>> Plus functions.
>
> No:
>
>>>> def f():
> ...  break
> ...
>  File "<stdin>", line 2
> SyntaxError: 'break' outside loop
>

Yeah, I see what you mean.  I wasn't talking about the actual break
keyword, but rather having a "break" in execution.  Basically
execution of the current frame stops and returns; loop bodies aren't
handled in their own execution frames but effectively it's the same
idea.

So, a little namespace collision between us there on the words break
and return.  Regardless, for the only real use case I had for module
breaking flow control, I have a better solution anyway.  Thanks again
for your feedback.

-eric

> --
> Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
>  San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
>  Do not stand in a place of danger trusting in miracles.
>   -- (an Arab proverb)
> --
> http://mail.python.org/mailman/listinfo/python-list
>

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


Thread

Re: break in a module Ethan Furman <ethan@stoneleaf.us> - 2011-06-14 16:28 -0700
  Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-14 16:51 -0700
    Re: break in a module Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-14 18:51 -0600
      Re: break in a module Ben Finney <ben+python@benfinney.id.au> - 2011-06-15 11:33 +1000
        Re: break in a module Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-14 20:21 -0600
          Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 15:09 -0700
        Re: break in a module Dave Angel <davea@ieee.org> - 2011-06-15 00:02 -0400
      Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 15:07 -0700
        Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-17 09:27 +1000
          Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 16:29 -0700
            Re: break in a module Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-16 18:00 -0600
            Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-17 10:01 +1000
              Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 18:13 -0700
                Re: break in a module Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 19:17 -0700
                Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 21:21 -0700
                Re: break in a module Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-16 22:53 -0600
        Re: break in a module Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-17 00:48 +0000
          Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-17 10:57 +1000
            Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 18:21 -0700
              Re: break in a module Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 19:11 -0700
              Re: break in a module Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-16 19:58 -0600
                Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 21:24 -0700
                Re: break in a module Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-16 22:50 -0600
                Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-16 22:20 -0700
                Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-17 15:56 +1000
                Re: break in a module Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-17 06:00 +0000
                Re: break in a module Erik Max Francis <max@alcyone.com> - 2011-06-17 00:09 -0700
                Re: break in a module Cameron Simpson <cs@zip.com.au> - 2011-06-18 12:36 +1000
                Re: break in a module Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-18 03:50 +0000
                Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-18 14:31 +1000
                Re: break in a module Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-18 04:49 +0000
                Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-18 15:06 +1000
                Re: break in a module Cameron Simpson <cs@zip.com.au> - 2011-06-21 20:04 +1000
                Re: break in a module Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-17 00:25 -0600
    Re: break in a module Chris Angelico <rosuav@gmail.com> - 2011-06-15 11:33 +1000

csiph-web