sys.maxint gives the largest positive integer supported by Python's
regular integer type. But maybe such attribute, with few others (they
can be called min and max) can be given to int type itself.
D is a very nice language, that I hope to see more used. It is copying
lot of things from Python. D Floating point values have some
proprieties:

http://www.digitalmars.com/d/property.html

Properties for Floating Point Types:
.init           initializer (NaN)
.infinity       infinity value
.nan            NaN value
.dig            number of decimal digits of precision
.epsilon        smallest increment
.mant_dig       number of bits in mantissa
.max_10_exp     maximum exponent as power of 10
.max_exp        maximum exponent as power of 2
.min_10_exp     minimum exponent as power of 10
.min_exp        minimum exponent as power of 2
.max            largest representable value that's not infinity
.min            smallest representable value that's not 0
.re             real part
.im             imaginary part

I think such attributes may be useful to be added to Python float
type/values too.

Bye,
bearophile

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to