suppressing import errors

Ian Kelly ian.g.kelly at gmail.com
Tue Nov 15 17:09:31 EST 2011


On Tue, Nov 15, 2011 at 2:42 PM, Arnaud Delobelle <arnodel at gmail.com> wrote:
> It's idiomatic to write "x is None" when you want to know whether x is None.

It's also idiomatic to just write "if x:" when you want to know
whether x is something or nothing, and that's what I would probably do
here.  Either is correct.



More information about the Python-list mailing list