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

Chris Angelico rosuav at gmail.com
Fri Jul 12 16:52:47 CEST 2013


On Sat, Jul 13, 2013 at 12:43 AM, 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?

Considering that Python can't represent π in a float anyway, I
wouldn't be too bothered. And what else? float('τ') for twice that
value? Not really necessary imho.
ChrisA


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /