[Python-ideas] math.inf and math.nan constants

Guido van Rossum guido at python.org
Wed Jan 7 17:07:45 CET 2015


+1. Let's do it.

On Wed, Jan 7, 2015 at 7:23 AM, Marco Buttu <marco.buttu at gmail.com> wrote:

> On 07/01/2015 15:58, Todd wrote:
>
>  Yes, this would be a shortcut for that.  math.nan and math.inf are less
>> verbose than float("nan") and float("inf"), even if you aren't already
>> using the math module (fewer characters total, and in particular fewer
>> special characters).  It would also, at least in my opinion, be more
>> readable.  Plus there is already the math.isnan and math.isinf, so I don't
>> think it would be totally out-of-place.
>>
>
> I totally agree. +1
>
> --
> Marco Buttu
>
> INAF-Osservatorio Astronomico di Cagliari
> Via della Scienza n. 5, 09047 Selargius (CA)
> Phone: 070 711 80 217
> Email: mbuttu at oa-cagliari.inaf.it
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150107/396d4e12/attachment.html>


More information about the Python-ideas mailing list