Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.130 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.03; 'float': 0.07; 'cc:addr :python-list': 0.11; '754': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:versus': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; 'fri,': 0.33; 'received:google.com': 0.35; 'represent': 0.38; 'pm,': 0.38; 'rather': 0.38; 'numbers': 0.61; 'course': 0.61; 'real': 0.63; 'mar': 0.68; '20,': 0.68; '2015': 0.84; 'tricky': 0.84; '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:content-transfer-encoding; bh=/b+G7XdUkWKSRmYQaevM9G/y6lP/0KXD/qUnWMC3wGs=; b=yK6RLlGelFHDCIAQDAGlamAqF629ihQ2sL+t1F7NLKA7tsNfwkI/HDkx27iS9OXMPJ 7r0zucB+6KEjQSRrtrQtKf08rkaWtIsxsw1AlTgbhP2ufkdxrhhVbe0rTrFneTIYmgr/ ghQLpUMbGt2Qve/ZqtO1u8RUE12CAK6itC+IohymN3a8EqXAE8Ww5XsGhxLSPGMAflli UqOzEfdCv1eyPZemfQJMtzkU6Coxb1ohZ7FbNRpqKvYifq97SohtC2LL+ISCLM+jES76 +wXZLPaV+MU7XmVHLqZYb8s2SgV98rJe0lu72vuTuTaAxVA2/lY4X4TfQAX06eaNWFjl 1eGw== MIME-Version: 1.0 X-Received: by 10.43.38.144 with SMTP id ti16mr1709167icb.26.1426826148248; Thu, 19 Mar 2015 21:35:48 -0700 (PDT) In-Reply-To: References: <817c8567-1dbb-436c-8a1f-86446e30d12d@googlegroups.com> Date: Fri, 20 Mar 2015 15:35:48 +1100 Subject: Re: Deep comparison of dicts - cmp() versus ==? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 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: 1426826156 news.xs4all.nl 2897 [2001:888:2000:d::a6]:60454 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3535 X-Received-Body-CRC: 3064419186 Xref: csiph.com comp.lang.python:87762 On Fri, Mar 20, 2015 at 2:47 PM, Rustom Mody wrote: > IOW: float is a poor approximation to =E2=84=9D. Of course it's a poor approximation. That's because real numbers are uncountably infinite, so it's rather tricky to represent and manipulate them efficiently. IEEE 754 gives us practicality rather than purity. ChrisA