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: Sat, 16 Jul 2016 17:27:43 +1000 Lines: 24 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de ORPWifaRgjQrh/aCus3GtAmyU7vYX7bCQMH14LgdtyKg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'type,': 0.07; 'cc:addr:python-list': 0.09; 'stored': 0.10; '2016': 0.16; 'ascii,': 0.16; 'bugs,': 0.16; 'build"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mean,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Singleton': 0.16; 'wrote:': 0.16; 'string': 0.17; 'attribute': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'sat,': 0.23; 'header :In-Reply-To:1': 0.24; 'linux': 0.26; 'rest': 0.26; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'behaviour': 0.29; 'decimal': 0.29; 'too.': 0.30; 'received:google.com': 0.35; 'ones': 0.35; 'could': 0.35; 'unicode': 0.35; 'expected': 0.35; 'should': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'difference': 0.38; 'does': 0.39; 'where': 0.40; 'mark': 0.40; 'different': 0.63; 'our': 0.64; 'between': 0.65; 'jul': 0.72; 'chrisa': 0.84; 'float,': 0.84; 'choose.': 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:to :cc; bh=8SD1ddqToWXJYLnzl/BgHnIiiN0/Ixe4LKGHq/3JW8Y=; b=B5+h9smDfWziiflJ4T86gsd5TXt/bv33BEksz4qPwIpriwwNZf4By5fD3cyNoCi3wv dt7LS+/2B6r0FSBm+x2EFUoPwQW04zSDcnYXUzWKLyIiqxtZEC5wfBtkVxp4vF8LnStW hExcLwJP7Ot/Ztta2SLkhhovdWgviA7pHBG3loKuOAL9kQCPGzNZJ1zVNO/uqVxVkBE3 b+wpcvU63zmqAqwFflB/Vzf/Rzyn9XsBrkamV7hVEBnHQ9Vm1969FFoFqjUZSSj74CS0 f+2svXaxocbq4tuG0mLJjjHW5xuz0rbBAJ1yb7R+bwIA3ydV+kuiHI9T8BAo+9lAc56B 6l9w== 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:to:cc; bh=8SD1ddqToWXJYLnzl/BgHnIiiN0/Ixe4LKGHq/3JW8Y=; b=fM2erP/Qn/CyNkbjuxQF/1gRuviLqWG1U/BDpbhQ3ahE2mTungMxc1eOCGPiptInSi R/WBRinRRWz06g99faz9j3iwGd/ioEYnq4k5Om9HxrsB6YHY2UnKo5gn6dp/DRzRt7EB O9oxdt0SbiWY1STv84HunidAHVhYD1/sixoZWg+uS7WsRJKmRpKK+yH5xj4g23OKOgcR TMymaz/IQbvz58woqJg04l1tpZaafXfMlhkZ78pijyBs3OvXRkzz8ozSSeq3w+DpohHg C4aXWY4Sp3sBAc3JDRJEZzpTghP14r9Av6QA40GLSUJvkebJIpxqvsd21sNFZOJa0SSb z/fA== X-Gm-Message-State: ALyK8tKHwu5Q3YlxXCSxY1axIl/gQI6HylNRD/x00EUBxXMeBcAVV8glMOZYCJytmBfGKibo0g6UirrMhwjY4A== X-Received: by 10.28.44.131 with SMTP id s125mr25670312wms.61.1468654063978; Sat, 16 Jul 2016 00:27:43 -0700 (PDT) In-Reply-To: <1468652038.1427719.667878897.460955C0@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> Xref: csiph.com comp.lang.python:111498 On Sat, Jul 16, 2016 at 4:53 PM, Random832 wrote: > On Sat, Jul 16, 2016, at 02:29, Chris Angelico wrote: >> The difference between ints and floats can lead to bugs, too. Which >> one should we eliminate? > > 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.) > > *which may have multiple concrete representations, just as our single > abstract unicode string type has different concrete representations for > ASCII, Latin-1, UCS-2, and UCS-4. Thing is, a Unicode string could be represented in exactly one way (UCS-4), with identical semantics. Look at Py2's "wide build" (eg most Linux builds). The rest is just optimization. With a single abstract numeric type, what exactly does "inexact" mean, where does it come from, and how does that affect the expected behaviour and performance of numbers? Will an "Exact" non-integer be stored as Decimal or Fraction? How do you know? They have vastly different semantics, and you should be able to choose. ChrisA