Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73286

Re: Python's numeric tower

References <539d0a40$0$29988$c3e8da3$5496439d@news.astraweb.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-06-15 01:22 -0600
Subject Re: Python's numeric tower
Newsgroups comp.lang.python
Message-ID <mailman.11068.1402818363.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jun 14, 2014 at 8:51 PM, Steven D'Aprano
<steve+comp.lang.python@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)?

>>> issubclass(decimal.Decimal, numbers.Number)
True
>>> issubclass(decimal.Decimal, numbers.Complex)
False

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python's numeric tower Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-15 02:51 +0000
  Re: Python's numeric tower Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-15 01:22 -0600
    Re: Python's numeric tower Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-15 15:33 +0000
      Re: Python's numeric tower Roy Smith <roy@panix.com> - 2014-06-15 13:28 -0400
        Re: Python's numeric tower Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-15 11:45 -0600
        Re: Python's numeric tower Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-16 00:38 +0000
          Re: Python's numeric tower Chris Angelico <rosuav@gmail.com> - 2014-06-16 11:02 +1000
            Re: Python's numeric tower Roy Smith <roy@panix.com> - 2014-06-15 21:57 -0400
              Re: Python's numeric tower Chris Angelico <rosuav@gmail.com> - 2014-06-16 12:04 +1000
                Re: Python's numeric tower Roy Smith <roy@panix.com> - 2014-06-15 22:17 -0400
                Re: Python's numeric tower Dan Sommers <dan@tombstonezero.net> - 2014-06-16 03:38 +0000
                Re: Python's numeric tower Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-16 09:29 +0100
                Re: Python's numeric tower Roy Smith <roy@panix.com> - 2014-06-15 23:48 -0400

csiph-web