"also" to balance "else" ?

Tim Roberts timr at probo.com
Thu Jun 16 23:47:42 EDT 2005


Nicolas Fleury <nid_oizo at yahoo.com_remove_the_> wrote:
>
>But the feature is already there:
>
>for x in <iterable>:
>     BLOCK1
>     if <condition>:
>         ALSO-BLOCK
>         break
>else:
>     BLOCK2

I've been using Python for 8 years.  I never knew that feature was in
there.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list