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


Groups > comp.lang.python > #87762

Re: Deep comparison of dicts - cmp() versus ==?

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 <rosuav@gmail.com>
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 <d6e3083d-881e-4c6d-b69c-c738b3e59f64@googlegroups.com>
References <d88b9040-b566-48fc-89e9-c6dffcd369bd@googlegroups.com> <mailman.31.1426818822.10327.python-list@python.org> <817c8567-1dbb-436c-8a1f-86446e30d12d@googlegroups.com> <f95ad316-cf77-42e6-b549-ccd185c3fbca@googlegroups.com> <mailman.33.1426822502.10327.python-list@python.org> <d6e3083d-881e-4c6d-b69c-c738b3e59f64@googlegroups.com>
Date Fri, 20 Mar 2015 15:35:48 +1100
Subject Re: Deep comparison of dicts - cmp() versus ==?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.34.1426826156.10327.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Fri, Mar 20, 2015 at 2:47 PM, Rustom Mody <rustompmody@gmail.com> wrote:
> IOW: float is a poor approximation to ℝ.

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

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


Thread

Deep comparison of dicts - cmp() versus ==? Victor Hooi <victorhooi@gmail.com> - 2015-03-19 19:00 -0700
  Re: Deep comparison of dicts - cmp() versus ==? Ben Finney <ben+python@benfinney.id.au> - 2015-03-20 13:33 +1100
    Re: Deep comparison of dicts - cmp() versus ==? Victor Hooi <victorhooi@gmail.com> - 2015-03-19 19:57 -0700
      Re: Deep comparison of dicts - cmp() versus ==? Rustom Mody <rustompmody@gmail.com> - 2015-03-19 20:27 -0700
        Re: Deep comparison of dicts - cmp() versus ==? Chris Angelico <rosuav@gmail.com> - 2015-03-20 14:34 +1100
          Re: Deep comparison of dicts - cmp() versus ==? Rustom Mody <rustompmody@gmail.com> - 2015-03-19 20:47 -0700
            Re: Deep comparison of dicts - cmp() versus ==? Chris Angelico <rosuav@gmail.com> - 2015-03-20 15:35 +1100
            Re: Deep comparison of dicts - cmp() versus ==? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-20 17:35 +1100
              Re: Deep comparison of dicts - cmp() versus ==? Roy Smith <roy@panix.com> - 2015-03-20 08:49 -0400
              Re: Deep comparison of dicts - cmp() versus ==? Rustom Mody <rustompmody@gmail.com> - 2015-03-20 06:46 -0700
        Re: Deep comparison of dicts - cmp() versus ==? Ben Finney <ben+python@benfinney.id.au> - 2015-03-20 16:09 +1100
          Re: Deep comparison of dicts - cmp() versus ==? Rustom Mody <rustompmody@gmail.com> - 2015-03-20 06:35 -0700
            Re: Deep comparison of dicts - cmp() versus ==? Marko Rauhamaa <marko@pacujo.net> - 2015-03-20 16:10 +0200
              OT Intuitionism+Platonism+Mysticism => CS (was Deep comparison of dicts...) Rustom Mody <rustompmody@gmail.com> - 2015-03-20 23:01 -0700
                Re: OT Intuitionism+Platonism+Mysticism => CS (was Deep comparison of dicts...) Marko Rauhamaa <marko@pacujo.net> - 2015-03-21 08:28 +0200
                Re: OT Intuitionism+Platonism+Mysticism => CS (was Deep comparison of dicts...) Rustom Mody <rustompmody@gmail.com> - 2015-03-31 20:53 -0700
        Re: Deep comparison of dicts - cmp() versus ==? Chris Angelico <rosuav@gmail.com> - 2015-03-20 16:27 +1100

csiph-web