Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '16,': 0.03; 'subject:Python': 0.06; 'method,': 0.09; 'sure,': 0.09; 'type,': 0.09; 'cc:addr:python-list': 0.11; '1),': 0.16; 'already!': 0.16; 'docstring': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'throw': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'too.': 0.31; 'operators': 0.31; 'probably': 0.32; 'guess': 0.33; 'definition': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'list': 0.37; 'sure': 0.39; 'number,': 0.60; 'tell': 0.60; 'numbers': 0.61; 'sum': 0.64; 'smith': 0.68; 'guaranteed': 0.75; 'article': 0.77; 'hand': 0.80; 'to:none': 0.92 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:cc :content-type; bh=FnI2H7pH9i32QD9zDwfQiSZMZixf5/YadX/P8YaN/DM=; b=Pin+OaUTNwkQB5o8ts0rMglEe6pSwGswbitKj+rYfSY2qWTmzeTgBIQHg601WeUwUW yEHNiuV4fp2vGshi8wOmGEaj7+Doc9Ofk/lcJ+D7esT0xATQlyzF5TeRH3+IwvXKHMxF DioswacGGM1XzchDv7GCIyiZz6GhtSBggerVBwQvEWYqwwHbAh6F7Zy0S5kBByaMCqm3 8J5oYUQggadsi6VzXYriQLio9l8eX4Nltl+ne+ab9zqLKYYEqPUGB/Oi3x9s8QzSHUce pEMkW0qKrb0RSCvCm4Fvbml7yFvjuHHXzzweT7zwNZrmPabZ8WDIJ1eyxVd4TSYZ1PYa B0oA== MIME-Version: 1.0 X-Received: by 10.58.85.3 with SMTP id d3mr9245vez.34.1402884246942; Sun, 15 Jun 2014 19:04:06 -0700 (PDT) In-Reply-To: References: <539d0a40$0$29988$c3e8da3$5496439d@news.astraweb.com> <539dbcbe$0$29988$c3e8da3$5496439d@news.astraweb.com> <539e3c95$0$29988$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 16 Jun 2014 12:04:06 +1000 Subject: Re: Python's numeric tower From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402884256 news.xs4all.nl 2890 [2001:888:2000:d::a6]:53156 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73302 On Mon, Jun 16, 2014 at 11:57 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> I guess if you have a list of Numbers that are all the same type, you >> can probably sum them, but you can sum non-Numbers too. The docstring >> is a bit vague - sure, it's a number, but what can you do with it? > > You can use it to count to three! Since "increment" is not a provided method, and the + and += operators are not guaranteed to be defined for any definition of 1 on the other side, I'm not sure that's actually true... but if you hold a hand grenade and want to know whether to count to Decimal('3') or 3+0j or Fraction(3, 1), I'm just going to tell you to throw the thing already! ChrisA