Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15744

Re: suppressing import errors

References (5 earlier) <0601B8C7-9AEF-443A-A149-0F7D356345EF@gmail.com> <CAPTjJmrP7fMg9UfxdsR=5j6EW4yFKf8gR4xYQD5zDwMUVxdmjw@mail.gmail.com> <F8266E63-F932-4216-9E33-8333C1D62E43@gmail.com> <CAPTjJmofCYDy5rLPzCJPNMj5qM_KAc9606RmLKAtcaySjwf92w@mail.gmail.com> <CAJ6cK1ZDAnWRH2GDWHFaLFvanx1Ga6n5=Cb79jX4oPNpeO52rQ@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2011-11-15 15:09 -0700
Subject Re: suppressing import errors
Newsgroups comp.lang.python
Message-ID <mailman.2753.1321395004.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Nov 15, 2011 at 2:42 PM, Arnaud Delobelle <arnodel@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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: suppressing import errors Ian Kelly <ian.g.kelly@gmail.com> - 2011-11-15 15:09 -0700

csiph-web