Is this PEP-able? fwhile
Ian Kelly
ian.g.kelly at gmail.com
Tue Jun 25 00:50:59 EDT 2013
On Mon, Jun 24, 2013 at 6:41 PM, wu wei <wuwei23 at 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.
More information about the Python-list
mailing list