[Python-ideas] float('∞')=float('inf')

Zaur Shibzukhov szport at gmail.com
Sun Jul 14 15:53:46 CEST 2013


воскресенье, 14 июля 2013 г., 16:55:46 UTC+4 пользователь Ned Batchelder 
написал:

>  On 7/14/2013 7:08 AM, Philipp A. wrote:
> Looking back through the many emails about this so far, I didn't see where 
> the OP explained why he wanted this to work.  Zaur Shibzukhov never said he 
> had it in his data, he said, "Is it good idea to allow float('∞') to be 
> float('inf') in python?" and, "Because infinity is special case of numbers. 
> Unicode standard have regular infinity symbol and it's natural to represent 
> inifinity as ∞."
>
> As near as I can tell, we don't have an actual use case yet.
>

I think that actual use cases are rather belongs to numeric area.
For example, one could use infinity symbol when output infinity numerical 
results of calculations to the text file and another one input them. 
Usually float numbers in python world are converted from string using 
float(...). So any code that use float to convert from string could benefit.This 
is not a real use case though, but rather some scenario...


 

> _______________________________________________
> Python-ideas mailing listPython... at python.org <javascript:>http://mail.python.org/mailman/listinfo/python-ideas
>
>  
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130714/79572511/attachment.html>


More information about the Python-ideas mailing list