On Thu, Jun 16, 2011 at 5:29 PM, Erik Max Francis <m...@alcyone.com> wrote: > Chris Angelico wrote: >> >> On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis <m...@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 && m...@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 > -- http://mail.python.org/mailman/listinfo/python-list