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

Laurens Van Houtven _ at lvh.io
Fri Jul 12 15:43:50 CEST 2013


On Fri, Jul 12, 2013 at 3:21 PM, Gerald Britton <gerald.britton at gmail.com>wrote:

> >> Do you have the infinity symbol on your keyboard?  I don't!.
> >>
>
> >Why does what you have on your keyboard matter? Just because the example
> >uses a string literal, doesn't mean that's the only use case. I can pass
> >infinity symbols along in any text medium.
>
> Ummm...cause that's what I use when programming?
>

My point is that this doesn't have to come from source code. It can come
from any kind of user input, which is the more common use case for calling
float or int in the first place. If you just wanted the number, you'd just
type the literal. (Infinity, of course, is a little special, since it
doesn't have a literal -- just float("inf")).


> --
> Gerald Britton
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130712/93e81ea5/attachment.html>


More information about the Python-ideas mailing list