PyWart: Language missing maximum constant of numeric types!
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Feb 24 20:50:02 EST 2012
On Sat, 25 Feb 2012 06:52:09 +0530, Fayaz Yusuf Khan wrote:
> On Saturday 25 Feb 2012 12:37:58 AM MRAB wrote:
>> We already have arbitrarily long ints, so there could be a special
>> infinite int singleton (actually, 2 of them, one positive, the other
>> negative).
> Seconded. Although would a wish request to bugs.python.org saying "Allow
> storage of the integer infinity" make any sense to the developers? :P
If you explained it as a pair of special int values, INF and -INF, rather
than the storage of an infinite-sized integer, it would make perfect
sense.
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. Or make your own, it's not difficult. Publish it on
ActiveState, and if people flock to use it, then you will have a good
argument that this is useful and should be part of the Python built-ins.
--
Steven
More information about the Python-list
mailing list