PyWart: Language missing maximum constant of numeric types!

Rick Johnson rantingrickjohnson at gmail.com
Sat Feb 25 21:29:45 CET 2012


On Feb 24, 7:50 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:

> But it would also be rejected, and rightly so, as unnecessary complexity
> for the int type. There are already Decimal and float infinities, just
> use one of them.

Sure there are float INFINITIES that work fine for ints and floats,
but where is the consistency? INFINITY need not be a int or a float or
a str, or whatever. All it need be is a an object who always returns
itself as being larger in any comparison.

> Or make your own, it's not difficult.

INFINITY should be at the very least a constant of the math module.





More information about the Python-list mailing list