Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15736 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2011-11-16 07:01 +1100 |
| Last post | 2011-11-16 07:01 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: suppressing import errors Chris Angelico <rosuav@gmail.com> - 2011-11-16 07:01 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-11-16 07:01 +1100 |
| Subject | Re: suppressing import errors |
| Message-ID | <mailman.2746.1321387303.27778.python-list@python.org> |
On Wed, Nov 16, 2011 at 6:39 AM, David Riley <fraveydank@gmail.com> wrote: > True, and that does avoid polluting namespace. However, you shouldn't be testing for None as a bool; you should instead do an "if <module> is None:" (or, of course, "is not None"). Why not? Is there some other way for the module object to evaluate as false? ChrisA
Back to top | Article view | comp.lang.python
csiph-web