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

Laurens Van Houtven _ at lvh.io
Fri Jul 12 16:46:11 CEST 2013


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

> Man I don't know how you are doing this!  I just tried:
>
> float('<greek letter pi>') and got
>
> Value error: could not convert string to float '<greek letter pi>'
>
> For that matter, I can't figure out how to type the greek letter for
> pi in gmail!  Guess I have some things to learn.
>
> So, if Python doesn't recognize the symbol for pi, why should it
> recognize the one for infinity?
>

The example he posted is of digits, not of any particular symbol for a
constant. The difference, obviously, is that you can't write infinity as a
bunch of digits, whereas you can at least approximate pi with any number of
digits.

lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130712/d567e221/attachment-0001.html>


More information about the Python-ideas mailing list