Python's numeric tower
Roy Smith
roy at panix.com
Sun Jun 15 22:17:57 EDT 2014
In article <mailman.11075.1402884256.18130.python-list at python.org>,
Chris Angelico <rosuav at gmail.com> wrote:
> On Mon, Jun 16, 2014 at 11:57 AM, Roy Smith <roy at panix.com> wrote:
> > In article <mailman.11074.1402880950.18130.python-list at python.org>,
> > Chris Angelico <rosuav at gmail.com> 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
I don't believe HandGrenade implements throw(). It does, however,
implement lobbeth().
More information about the Python-list
mailing list