[Python-ideas] float('∞')=float('inf')
Joshua Landau
joshua at landau.ws
Fri Jul 12 17:45:41 CEST 2013
On 12 July 2013 16:42, Serhiy Storchaka <storchaka at gmail.com> wrote:
> 12.07.13 17:52, Chris Angelico написав(ла):
>>
>> On Sat, Jul 13, 2013 at 12:43 AM, Gerald Britton
>> <gerald.britton at gmail.com> wrote:
>>>
>>> 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.
>
>
> However Python can represent ½ in a float. Shouldn't it recognize the symbol
> for ½?
No. Why would we special-case ½? We'd need a ton of code just to
special-case ½, ¾, ⅛, ¼, ⅜, ⅝, ⅞, etc. We don't need or want to
special-case any more values.
More information about the Python-ideas
mailing list