Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.104 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.81; '*S*': 0.02; 'logic': 0.09; 'benjamin': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'sense,': 0.16; 'sorting': 0.16; 'types,': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'aug': 0.22; 'integer': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'to:addr :python-list': 0.38; 'little': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; 'real': 0.63; 'different': 0.65; 'between': 0.67; 'oscar': 0.84; 'subject:results': 0.91; '2013': 0.98 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=lJuT092XVm9YAxlzdr+qdCbcMSgdJt/YyT4rHW1vCzU=; b=xM8IFYV8ia0G5jvi9J53VAerenWw3I0U6p1m3EIHJUPn0pzn9xuk2KwsQOeNgzwMxZ OMQpO+3RolQNYtaw0ZFxpa+lk0SmD0txMFTrKBbxRwgEPfUqqDPc4Gh6RHVYD0C4XIEn 5Y1Tl2CPRi1sknrOlxy+DX3CnVI/vH0P23HputbHI03nnNJKcbTnMVMdeK/DRbbVXWIs 2wyd2cfFGxTYMm1JPxDArupNpAUjtgGW7/C7kz3TYCiqqf993mxaDXTfPzqvZjqe40+N lvezMYwvWbS/ITRaMBa3jVkf/0QldE3MEq36rpyBibu2j+eOSM/WlE8zujVpYUxA9uEM VgxA== MIME-Version: 1.0 X-Received: by 10.220.169.146 with SMTP id z18mr188193vcy.80.1375350521012; Thu, 01 Aug 2013 02:48:41 -0700 (PDT) In-Reply-To: References: <51f68d9c$0$30000$c3e8da3$5496439d@news.astraweb.com> <-tidnZTes6qk72TMnZ2dnUVZ8kadnZ2d@giganews.com> <51f9fe27$0$30000$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 1 Aug 2013 10:48:40 +0100 Subject: Re: Unexpected results comparing float to Fraction From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375350529 news.xs4all.nl 16000 [2001:888:2000:d::a6]:40982 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51725 On Thu, Aug 1, 2013 at 10:44 AM, Oscar Benjamin wrote: > The real dividing line between {int, Fraction} and {float, Decimal, > complex} is about (in)exactness. The numeric tower ensures the > property that inexactness is contagious which I think is a good thing. *nods slowly* That does make sense, albeit a little oddly. So when you're sorting out different integer sizes (C's short/int/long, Py2's int/long), you go to the "better" one, but when working with inexact types, you go to the "worse" one. But I can see the logic in it. ChrisA