An "Object" class?

Chris Angelico rosuav at gmail.com
Wed Aug 28 14:42:25 EDT 2019


On Thu, Aug 29, 2019 at 4:35 AM Cristian Cocos <cristi at ieee.org> wrote:
>
> Thank you! I can see that the taxonomy of built-in classes (i.e. the
> subclass/superclass relations) is not very developed. At the very least I
> would have loved to see stuff such as int declared as a subClass/subType
> of float and the like--that is, a class taxonomy in tune with standard
> mathematical practice, but I am guessing that mathematical kosher-ness had
> to take a back seat to implementational concerns.

In mathematics, integers are a strict subset of reals, but that
doesn't mean that the integer type is a subclass of the float type.
Floats in computers are not the same as reals in mathematics; most
notably, they are far from infinite in either magnitude or precision.

ChrisA



More information about the Python-list mailing list