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 08:18:01 +1000 Lines: 21 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 6fUNF87uu1C37Cp7SkdEig6vqFW4XduiUeDTS8z6a0lg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'float': 0.05; 'nicely': 0.07; 'repeated': 0.07; 'cc:addr:python-list': 0.09; 'restriction': 0.09; 'result.': 0.15; '0.2': 0.16; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Singleton': 0.16; 'wrote:': 0.16; 'instance,': 0.18; 'math': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'header:In-Reply- To:1': 0.24; "doesn't": 0.26; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.27; 'arguments,': 0.29; 'convert': 0.29; 'getting': 0.33; '(for': 0.34; 'case,': 0.34; 'add': 0.34; 'received:google.com': 0.35; 'trouble': 0.35; 'mix': 0.35; 'quite': 0.35; 'possible': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'drop': 0.38; 'does': 0.39; 'unable': 0.39; 'jul': 0.72; 'incredibly': 0.76; 'chrisa': 0.84; 'to:none': 0.91 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=e/Y0Y60Hi+4sFxtcD6nFikmAVSNT7nTjgKAGNp4S3Os=; b=W0FUVGUqJqvFsY8Er7h1skDYNC+VxDNvMG9MMoZqFcOQS5aA53T97G+gdI497Pt2Ph djdMvR9G6FIK4gVsYaJ0nfLomKXlvlxABYZizvOJXV+ULoYdIQVH4tW42ASj1KI7MF++ DXlZ83iQeQpWCcfCrGq1NxZzseNwpgUqScMzfWgntOhZm2irCmU2voyhn6JpBiY+LSEL ngg7UoOQJsexchghHN4OS6OJ2kNRmnNRfJuzrCw5mJiIMCEbAu/9upeM+lQs97FOmCFd Y1Qq0TVXhjC4Xo+Cy22cH646XzrgscuiES4U23dSbf8LC1qGVFmZ/1wDkrjFlrYo+hFr Uehw== 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=e/Y0Y60Hi+4sFxtcD6nFikmAVSNT7nTjgKAGNp4S3Os=; b=Pij3+ejPTLGokFz5cOrQfQu9HcLN3wMpO4gxaRFGEjVRYJwOzKE9hI5EBF5sw4+QZF BySLyDCPx+7ND0MU/4OB79r9mBcD6NqDB+Z/sSsH3TybK63PMf6NO6iVbWyITbvgWBeL blhpa4q4yLa72WeF68hRjr+31Gmfwnfk/qsszoQvO3KIFGPWxauuiUcArnxcDULmULFu KQkeJxW295pzodz9HvmEYl7hCLGqYMifPnD3LcnrocEWDWLGjj4TEspAY38KCvZvbmFJ k+jOHArcHyJ4fDM+KGSBVNSC3fl1TCgCP2CNziF2F+d91X+oaNDX4cBA0pPo8pTdorom 7o6w== X-Gm-Message-State: ALyK8tK3NrjixEEj1uP5l4wjsJ28KfQQXw0boOfgRZx8lCtNk0jbx/NweFu0ViTMwB9Vam2MVgkPaMEGRnFHNQ== X-Received: by 10.28.144.80 with SMTP id s77mr47363297wmd.41.1468707481912; Sat, 16 Jul 2016 15:18:01 -0700 (PDT) In-Reply-To: <87wpkluvcp.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> Xref: csiph.com comp.lang.python:111525 On Sun, Jul 17, 2016 at 7:27 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> In that case, an 'Exact' non-integer will have appalling performance - >> fractions.Fraction doesn't really work all that nicely when the >> numbers start getting huge. > > In Scheme, any math operation is allowed to drop exactness: > > If one of these procedures is unable to deliver an exact result when > given exact arguments, then it may either report a violation of an > implementation restriction or it may silently coerce its result to an > inexact number. The trouble is, repeated addition of fractions is *able* to deliver an exact result. It just might result in an incredibly slow program. And then if you mix types, does it aim for the greatest possible 'accuracy', even if that's not quite accurate? (For instance, if you add 0.2 to 5/8, does it convert to float or to fraction?) ChrisA