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 18:44:35 +1000 Lines: 19 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> <1468742901.2556137.668478097.6FBDE3C3@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de xeD446Wtnb09l2LDTD9SGAxAHwd6h69Ym/WM2g000f5A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'float': 0.05; 'type,': 0.07; 'cc:addr:python-list': 0.09; 'question.': 0.13; '2016': 0.16; 'decimal.': 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; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; "aren't": 0.22; 'implicit': 0.22; 'sorry,': 0.22; 'forgot': 0.23; 'header:In- Reply-To:1': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'though,': 0.32; 'choices': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'something': 0.35; 'pm,': 0.36; 'subject:: ': 0.37; 'one,': 0.37; 'your': 0.60; 'claim': 0.61; 'different': 0.63; "they're": 0.66; 'choose': 0.68; 'jul': 0.72; 'price.': 0.76; 'chrisa': 0.84; 'float,': 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=WjCIInw0DIR9qsg4WYgRNsRN7Yx0QpDe6B8CVgTfYBs=; b=qh0ScIQ3If5AwT2RQNDI4CTNKb40gs7PcZD6XDwkU89qxVcBQ4LMMMO10S50PFyvAQ aKuDfzUUVojxIWpQp1lTm05z0Yo7g0ujKnHqzvLOuXV8bfVkrOIkSYV0COkmYlGrRAlH PfyD8iQjeF2IgcGLlT4GBKD5jv93dycnOM3qZhCHBi5Rv8jRvDS7X7EQfbfgCTFuwLyJ HMPrtENAKjSb5Ebc3B8icysy1Drr80Tb82yIY/B1YguSN9s7tAEbbe4DrTakra6iAyAL hp9kHTapU2KwCyvQG3v0CDzSe+5a/eP7J3GBhRBNUUDJPgLJBWb7/vNNeJ3e4luBlqD+ 3SXA== 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=WjCIInw0DIR9qsg4WYgRNsRN7Yx0QpDe6B8CVgTfYBs=; b=DfktmFRwALpIXyjLSrRILXsQ94SwwZxwBftzz+axdvfV7L89DK7azLcN4xZFO7nkJ6 85SLWsGPnJatMguwxLr555JfXSYHo5dOxbbgsFwcaNV54NdxyfiiZKvK11WU5eeYopp8 KqTGxsT+nWwJBKin5g3syzDFu7N2WTDj9WT9QS3U7zVL90/QZFoJX3E0y/sDI1vTF8jh H6vukh/Otwm3mJcS/94cG3te2o3Hzehpp5S4sHvzXCbUkmPpcYnMBFqREAoH19CGbAsx qCO4ezX5NN2xQlrNW8TrkUw2CL66rfRrW2aX4pNbWW9RSUf9fhRpexWOyGbU3mHC73i6 Pa3g== X-Gm-Message-State: ALyK8tKAiUFJFAY4c+TOtHLjcp/Qh8YQ4UBUOYQldjnOGwlldZlRmpJendbz7jMEAzxbZ6IkCMhNvwSz4GUOUA== X-Received: by 10.28.144.80 with SMTP id s77mr48951759wmd.41.1468745076999; Sun, 17 Jul 2016 01:44:36 -0700 (PDT) In-Reply-To: <1468742901.2556137.668478097.6FBDE3C3@webmail.messagingengine.com> 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> <1468742901.2556137.668478097.6FBDE3C3@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:111559 On Sun, Jul 17, 2016 at 6:08 PM, Random832 wrote: > On Sun, Jul 17, 2016, at 03:51, Chris Angelico wrote: >> 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? > > Sorry, I forgot to answer your question. Though, your implicit claim > that it's impossible to make choices if your choices aren't represented > by different types is absurd. > > For example, you could have a function that returns an inexact number > with the (approximately) same value as the given number. Which inexact type, though? Do you get decimal.Decimal, float, or something else? How do you make that choice? And it's a critical choice to make. They're not just "inexact numbers". You can have an exact float (eg 7/2) or an inexact one, and same with Decimal. ChrisA