Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'bug': 0.02; 'subject:object': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'none.': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:None': 0.09; '~ethan~': 0.09; 'method.': 0.15; 'none"': 0.16; "wouldn't": 0.17; 'wrote:': 0.18; 'subject:not': 0.21; 'header:In-Reply-To:1': 0.22; 'itself,': 0.23; "shouldn't": 0.23; 'compare': 0.28; 'subject:Test': 0.30; 'header:User-Agent:1': 0.33; 'to:addr :python-list': 0.34; 'nobody': 0.34; 'null': 0.34; 'unless': 0.35; 'equal': 0.36; 'none': 0.37; 'except': 0.37; 'received:76': 0.37; "there's": 0.37; 'could': 0.37; 'useful': 0.38; 'should': 0.39; 'why': 0.39; 'to:addr:python.org': 0.40; 'type': 0.61; 'types': 0.61; 'results': 0.63; 'received:websitewelcome.com': 0.64; 'received:184': 0.67; 'received:69.93': 0.67; 'received:gateway16.websitewelcome.com': 0.84 Date: Sun, 25 Dec 2011 20:26:06 -0800 From: Ethan Furman User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: python-list@python.org Subject: Re: Test None for an object that does not implement == References: <0d80ce25-9e65-4216-b26c-b8ee40f989a3@q9g2000yqe.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: c-76-105-214-227.hsd1.or.comcast.net ([192.168.74.5]) [76.105.214.227]:1860 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1324875078 news.xs4all.nl 6863 [2001:888:2000:d::a6]:42000 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17948 Nobody wrote: > nothing should compare > equal to None except for None itself, so "x is None" and "x == None" > shouldn't produce different results unless there's a bug in the comparison > method. > Why wouldn't you want other types that can compare equal to None? It could be useful for a Null type to == None. ~Ethan~