Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Clean Singleton Docstrings Date: Sun, 17 Jul 2016 17:51:47 +1000 Lines: 23 Message-ID: References: <7046c74e-e5ea-4dde-8847-8c556756a563@googlegroups.com> <5789B601.9000604@stoneleaf.us> <9d2a0934-bf26-42a8-9bb2-e4e75b2d2ad3@googlegroups.com> <1468652038.1427719.667878897.460955C0@webmail.messagingengine.com> <1468692272.2410242.668163177.52CA7567@webmail.messagingengine.com> <87wpkluvcp.fsf@elektro.pacujo.net> <87inw4vhhf.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 6jBX6/16xGI5DroR/K3yQgY5Lyb/b2RKd/GSnTfuaD4g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'true,': 0.04; 'feature.': 0.07; 'repeated': 0.07; 'cc:addr:python-list': 0.09; 'type:': 0.09; 'result.': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'how,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Singleton': 0.16; 'wrote:': 0.16; 'attribute': 0.18; 'programmer': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'sat,': 0.23; 'header :In-Reply-To:1': 0.24; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.27; 'received:google.com': 0.35; 'ones': 0.35; 'trouble': 0.35; 'pm,': 0.36; 'subject:: ': 0.37; 'mark': 0.40; 'different': 0.63; 'choose': 0.68; 'jul': 0.72; 'incredibly': 0.76; 'price.': 0.76; 'chrisa': 0.84; 'float,': 0.84; 'to:none': 0.91; 'luxury': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=7xxNrGi5RYB0KszCeELkXnSGjpW+7A6ueNrc+fiiezM=; b=neCIhEObtV2rJrCz66bBVQabaX+xbxrIzZW9JPGOawOHh4zamEdc/8Ln6oK1ObpjFx RXBqyrPyKYeEFlZehfW2XyEMgd0jAZ9X2ijv4KcW6pFBG06603Z1R9n1oOvyR02UFGrf 2ikscypZWO5irnwDY2TKZh+GnhtZDfZ/Z64c8zMe0v0p/qjgNm8IC2JT+FSn2I8VDyBw TfTPBDL0di5Gj6TQZDdhsUe08uqZQMyIdNf99mAEBZs3YBAbV8oOhz513g/ZNjuO+hX9 HOSt1EL3c6q0C+j1BVOm2JCUuWYsDAoQgEaiGr2yc39Px6YD+h5eyHfnl5BZ7kgczfnv jyGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=7xxNrGi5RYB0KszCeELkXnSGjpW+7A6ueNrc+fiiezM=; b=kk9vJywfcvZtWZxUpnCE4SnPb++D307JGXP5Lk4CsmTDrQhtv6nK7k+EJn/Mb0PPpT UT5Ju3+f2lL8rDQ9rt+5JSvr+EDPHve7Lq2mh4zMWMzgMozYvsl9GypGI+oLgu2PYh4h IJ4He3T+2isLPpDLvsR38vDrHwsAAHZSd9RWFbKDJlYUQTHOOjglxZ7M5gSsu9uvhgGB rrc6p/iVCtWzlTq4ih8/LQishE5vxavzBmBa1OvK144H//vsFF2hzWn3hc+a8sXemm/a UlHvArPKWuVMRClzxaNs1vCEYHkpCBqKtJl+vrcsN+AGxbD1VEBxEsTXeKEsOV3lzSTk YVfg== X-Gm-Message-State: ALyK8tI1SAzlAsK8pmu7OXEbDY7HTK5sJcg8ZqyvFh3q7qC7g2QYm73TTRHX+QIwsGnQX8erIgloY8tAQOKCFA== X-Received: by 10.194.169.98 with SMTP id ad2mr7166254wjc.117.1468741908650; Sun, 17 Jul 2016 00:51:48 -0700 (PDT) In-Reply-To: <87inw4vhhf.fsf@elektro.pacujo.net> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <7046c74e-e5ea-4dde-8847-8c556756a563@googlegroups.com> <5789B601.9000604@stoneleaf.us> <9d2a0934-bf26-42a8-9bb2-e4e75b2d2ad3@googlegroups.com> <1468652038.1427719.667878897.460955C0@webmail.messagingengine.com> <1468692272.2410242.668163177.52CA7567@webmail.messagingengine.com> <87wpkluvcp.fsf@elektro.pacujo.net> <87inw4vhhf.fsf@elektro.pacujo.net> Xref: csiph.com comp.lang.python:111556 On Sun, Jul 17, 2016 at 5:41 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> The trouble is, repeated addition of fractions is *able* to deliver an >> exact result. It just might result in an incredibly slow program. > > True, although the programmer has control over the feature. If you > *want* the luxury of exact fractions, you pay the price. If you don't, > you make the numbers inexact. Not if you have a single "Number" type: On Sat, Jul 16, 2016 at 4:53 PM, Random832 wrote: > Eliminate both of them. Move to a single abstract numeric type* a la > Scheme, with an "inexact" attribute (inexact numbers may or may not be > represented by a float, or by the same bigint/decimal/rational types as > exact ones with a flag set to mark them as inexact.) Currently yes, you can choose to use fractions.Fraction and pay the price. How, if you have a single type with different representations, can you make that choice? ChrisA