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


Groups > comp.lang.python > #101859

Re: "x == None" vs "x is None"

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 <paul.hermeneutic@gmail.com>
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 <mailman.74.1453053678.15297.python-list@python.org> (permalink)
References <n7fo7q$dso$1@news2.informatik.uni-stuttgart.de> <mailman.57.1453025729.15297.python-list@python.org> <n7fshb$f36$1@news2.informatik.uni-stuttgart.de> <CAPTjJmrDZCiDLmRtiukDv2Z1Gz69fz3+_4xYeu-PoXBdC3dtGg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de GTrw8ETkRaqPB6qyW9OrNwIGDs+dzw8XnsNDMCH1w1Xw==
Return-Path <paul.hermeneutic@gmail.com>
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 <CAPTjJmrDZCiDLmRtiukDv2Z1Gz69fz3+_4xYeu-PoXBdC3dtGg@mail.gmail.com>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:101859

Show key headers only | View raw


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.

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


Thread

"x == None" vs "x is None" Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-17 09:51 +0000
  Re: "x == None" vs "x is None" Chris Angelico <rosuav@gmail.com> - 2016-01-17 21:15 +1100
    Re: "x == None" vs "x is None" Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-17 11:05 +0000
      Re: "x == None" vs "x is None" Peter Otten <__peter__@web.de> - 2016-01-17 12:26 +0100
      Re: "x == None" vs "x is None" Chris Angelico <rosuav@gmail.com> - 2016-01-17 22:29 +1100
      Re: "x == None" vs "x is None" <paul.hermeneutic@gmail.com> - 2016-01-17 11:01 -0700
      Re: "x == None" vs "x is None" Random832 <random832@fastmail.com> - 2016-01-17 16:33 -0500
      Re: "x == None" vs "x is None" Chris Angelico <rosuav@gmail.com> - 2016-01-18 08:38 +1100
      Re: "x == None" vs "x is None" Ben Finney <ben+python@benfinney.id.au> - 2016-01-18 13:46 +1100
  Re: "x == None" vs "x is None" fernando junior <fernandojr.ifcg@live.com> - 2016-01-19 14:20 -0800

csiph-web