Re: Python's numeric tower

2014-06-16 Thread Mark Lawrence
On 16/06/2014 04:38, Dan Sommers wrote: On Sun, 15 Jun 2014 22:17:57 -0400, Roy Smith wrote: I don't believe HandGrenade implements throw(). It does, however, implement lobbeth(). And therein lies the problem with Object Oriented Programming: instances of HandGrenade neither throw nor

Re: Python's numeric tower

2014-06-15 Thread Ian Kelly
On Sat, Jun 14, 2014 at 8:51 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Does anyone know any examples of values or types from the standard library or well-known third-party libraries which satisfies isinstance(a, numbers.Number) but not isinstance(a, numbers.Complex)?

Re: Python's numeric tower

2014-06-15 Thread Steven D'Aprano
On Sun, 15 Jun 2014 01:22:50 -0600, Ian Kelly wrote: On Sat, Jun 14, 2014 at 8:51 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Does anyone know any examples of values or types from the standard library or well-known third-party libraries which satisfies isinstance(a,

Re: Python's numeric tower

2014-06-15 Thread Roy Smith
In article 539dbcbe$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 15 Jun 2014 01:22:50 -0600, Ian Kelly wrote: On Sat, Jun 14, 2014 at 8:51 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Does anyone know

Re: Python's numeric tower

2014-06-15 Thread Ian Kelly
On Sun, Jun 15, 2014 at 11:28 AM, Roy Smith r...@panix.com wrote: In article 539dbcbe$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 15 Jun 2014 01:22:50 -0600, Ian Kelly wrote: On Sat, Jun 14, 2014 at 8:51 PM, Steven

Re: Python's numeric tower

2014-06-15 Thread Steven D'Aprano
On Sun, 15 Jun 2014 13:28:44 -0400, Roy Smith wrote: In article 539dbcbe$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 15 Jun 2014 01:22:50 -0600, Ian Kelly wrote: On Sat, Jun 14, 2014 at 8:51 PM, Steven D'Aprano

Re: Python's numeric tower

2014-06-15 Thread Chris Angelico
On Mon, Jun 16, 2014 at 10:38 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Mathematically, ℂ (complex) is a superset of ℝ (real), and Decimals are a kind of real(ish) number, like float: The Python complex type represents a subset of ℂ. The Python Decimal and float types

Re: Python's numeric tower

2014-06-15 Thread Roy Smith
In article mailman.11074.1402880950.18130.python-l...@python.org, Chris Angelico ros...@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

Re: Python's numeric tower

2014-06-15 Thread Chris Angelico
On Mon, Jun 16, 2014 at 11:57 AM, Roy Smith r...@panix.com wrote: In article mailman.11074.1402880950.18130.python-l...@python.org, Chris Angelico ros...@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

Re: Python's numeric tower

2014-06-15 Thread Roy Smith
In article mailman.11075.1402884256.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Jun 16, 2014 at 11:57 AM, Roy Smith r...@panix.com wrote: In article mailman.11074.1402880950.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: I guess if

Re: Python's numeric tower

2014-06-15 Thread Dan Sommers
On Sun, 15 Jun 2014 22:17:57 -0400, Roy Smith wrote: I don't believe HandGrenade implements throw(). It does, however, implement lobbeth(). And therein lies the problem with Object Oriented Programming: instances of HandGrenade neither throw nor lobbeth. One, Two, Five'ly yours, Dan --

Re: Python's numeric tower

2014-06-15 Thread Roy Smith
In article roy-ed231f.22175715062...@news.panix.com, Roy Smith r...@panix.com wrote: In article mailman.11075.1402884256.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Jun 16, 2014 at 11:57 AM, Roy Smith r...@panix.com wrote: In article