Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Newsgroups: comp.lang.python Subject: Re: "x == None" vs "x is None" Date: Sun, 17 Jan 2016 11:01:11 -0700 Lines: 6 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de GTrw8ETkRaqPB6qyW9OrNwIGDs+dzw8XnsNDMCH1w1Xw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'matches': 0.07; 'none)': 0.07; 'subject:None': 0.09; 'none).': 0.16; 'null.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'null)': 0.22; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'compared': 0.30; 'null': 0.33; 'received:google.com': 0.35; 'received:209.85': 0.36; 'subject:" ': 0.36; 'to:addr:python- list': 0.36; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'from:no real name:2**0': 0.60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ecwtfjNcxwomjMcncI+QW/WFfJlgYpzbH1mQ+ayaatk=; b=F1qOFE25fca7EueeIIcP7vTVpBP60RChE1VJlxGqOD79OXoFc2bMRF4G//fFwyY28u v6/jPIyzV3YnqKyBQ+6zr1I6fn7piJJuBzdzPt2mz9dz6a/+h1HOUK5dSxczzd50nbx1 kP3G+8iQg0ULhslUVGa9UejdK84ThFoLVVvqqSZzFWcWLGG8yGn0P2FUIBZkscy9mAAx mtsie7ZJkn2eHRLbhBXlT7/Khc+wU4ejchq+1WRnrxXTWmrctqyYjQ5/RzNIRJLWOjLD zTN37KCxdCobQAMGz1FfJPw11t1Oj5zcPY0ZNocWpI5RWxlL3XNlCMhuk/lnklo/HJeh J90A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ecwtfjNcxwomjMcncI+QW/WFfJlgYpzbH1mQ+ayaatk=; b=cjf1MlEmtbX9bHJcE0GfYkGhYCcdqeLhHXoU0whTTbqa5lB6pz0vtcJHJSHUd18+kR OF0Ox5SiDT4HNK4SulVjUhtA7EZT0XqHwO221V9C/yLoBNETBY/lOyGE9nsrhJtB60O/ f+ft110QFkfNsIe8hPa6gd7cZF/3e1bc4NeCrcIpe/9MHPte9GP+SychDWK1T1VJ15CK 3j+4a2s0+g2EC0/Bg5pvFZ4sDu48FuuiCQcXHfz6piWmGBzsdE/C7huSXnsLv2PxetVn 5VSK6oK3iGUcbs37y1uFicxtPolCJuBrQ9LmZO2sCd+eXtMeDg14jIbacD7/4eHo6sKj SHmg== X-Gm-Message-State: ALoCoQlZWqlf7nkZ1T5sRzxlyWa7IWR1fJYRK1etXzGwe8+B88h6X8OxhV3DZjP9nT0tZgKWsObTN+/9i86AKsbnB6yUwimgUw== X-Received: by 10.112.180.138 with SMTP id do10mr6938318lbc.127.1453053671711; Sun, 17 Jan 2016 10:01:11 -0800 (PST) In-Reply-To: X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101859 I prefer (x is None) and (x is not None). This matches the SQL concept of NULL. (X = NULL) is not valid since NULL is not a value and cannot be compared with anything.