To be clear: should that `if` test be "if not converged" ?

On Sun, Aug 11, 2013 at 1:18 AM, Jens Nockert <j...@nockert.se> wrote:

> I wouldn't call myself a Python programmer, but I have written a lot of
> Python and I know quite a few that do use and love the "for-else" construct.
>
> The most common (if not only?) usage that I have seen is something like
>
>   for i in xrange(…):
>     some-algorithm…
>     if coverged:
>       break
>   else:
>     fail!("Did not converge!")
>
> While cool and all, I cannot think that it has many use-cases outside of
> this. A macro is probably sufficient.
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>



-- 
*Tom Lee */ http://tomlee.co / @tglee <http://twitter.com/tglee>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to