Gerald Britton <gerald.brit...@gmail.com> writes:
>     if v:
>         f()
>
> I might, however, think more in a functional-programming direction.
> Then I might write:
>
>     v and f()

Python has conditional expressions.  The above would be:

    f() if v else None

using "and" is bug-prone.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to