Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.047 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; '"if': 0.04; 'correct.': 0.09; 'none.': 0.09; 'none"': 0.16; 'subject:import': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.23; 'message- id:@mail.gmail.com': 0.29; 'received:209.85.214': 0.30; 'received :mail-bw0-f46.google.com': 0.30; 'nov': 0.31; 'pm,': 0.31; 'tue,': 0.32; 'to:addr:python-list': 0.32; 'probably': 0.34; 'something': 0.36; 'received:google.com': 0.38; 'received:209.85': 0.38; 'either': 0.39; "it's": 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; '2011': 0.62; 'here.': 0.66; 'idiomatic': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=3s5CvFo2NY2xPBRqqNtV78ti3deIsQP5p7wZ9y13PlM=; b=CXlWw52liaBVJaD2E9MQqXAdSZYO/ke7M5vTU8ASSQqgth+RnnNiRwKWN4UTJmH+vu WqUxcqkdvhdg+jnfLBtOYDNiSvtwVUTN3rv+G8a/HVhRbyxXSp1LZ1PD9raQ7Gk7pi20 CBLFmLXzyWC4MzynjbhQZ3Cea0hu+T2oekvJo= MIME-Version: 1.0 In-Reply-To: References: <4EC2B656.7050902@sequans.com> <0601B8C7-9AEF-443A-A149-0F7D356345EF@gmail.com> From: Ian Kelly Date: Tue, 15 Nov 2011 15:09:31 -0700 Subject: Re: suppressing import errors To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 6 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1321395004 news.xs4all.nl 6937 [2001:888:2000:d::a6]:47584 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15744 On Tue, Nov 15, 2011 at 2:42 PM, Arnaud Delobelle 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.