Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'runs': 0.10; 'cc:addr :python-list': 0.11; 'python': 0.11; 'assume': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:operators': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'comparing': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '13,': 0.31; 'safely': 0.31; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'represent': 0.38; 'bad': 0.39; 'jul': 0.74; 'subject:Proposal': 0.91; 'to:none': 0.92 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:cc :content-type; bh=EcJIfq5wKmxDqhtogvwsLxHuBeCuE+urm+qaAjJgfYs=; b=thWuT95c/DZxPnr0SL7V3liifw1A7+rRdME3Am0zf/YgPQ5cAfDL3IXdz4tGqoI6eJ SvgYYWHHjZYwCnvbIFMPTokE3TQp1clnpBabiXtkPyhCf71o1DFHUYVR3m+XSzn6DAuN a0sAbhqFNrJwKkQgPzAvlc/7DhHmcqPKRmAiiTEcfdhSFjYKZ7D2Btm40/zDQqVLH75S 6PWZVsrJ2JepyqZejZgN8VQACq2fLOcrYjRYQxNG8DOJbfsus2+5VIwB2gRIAhCs3yTB T49Du1Gtc1IXi/ltR+PjUj0WLdjcI9yAGChX9z370boriATiH3LZISXdd0yYJg8nK+EM 3KeQ== MIME-Version: 1.0 X-Received: by 10.58.149.170 with SMTP id ub10mr7829198veb.0.1405206069831; Sat, 12 Jul 2014 16:01:09 -0700 (PDT) In-Reply-To: References: <53bce8a3$0$2746$c3e8da3$76491128@news.astraweb.com> <53bd08b4$0$2746$c3e8da3$76491128@news.astraweb.com> <53c163ba$0$9505$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 13 Jul 2014 09:01:09 +1000 Subject: Re: Proposal: === and !=== operators From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405206078 news.xs4all.nl 2868 [2001:888:2000:d::a6]:49443 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74390 On Sun, Jul 13, 2014 at 4:14 AM, Johannes Bauer wrote: > Bullshit. Comparing floats by their representation is *generally* a bad > idea because of portability issues. You don't know if IEEE754 is used to > represent floats on the systems that your code is used on. No, you don't, but I think you can safely assume that 1.0 == 1.0 on any system that Python runs on. ChrisA