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

Joshua Landau joshua at landau.ws
Fri Jul 12 17:50:04 CEST 2013


On 12 July 2013 16:26, Serhiy Storchaka <storchaka at gmail.com> wrote:
> 12.07.13 17:10, Joshua Landau написав(ла):
>
>> int and float are obviously meant to handle abstract inputs (not
>> expressions) and unicode infinity is an extension of this. Your
>> "analogies" are inapt.
>
>
> Why you think ½ (this is only one symbol!) and 3.(142857) (this is a decimal
> notation of the 22/7 fraction) are expressions, but ∞ or even -1 are not?

For the same reason that 0.5 and [0,
1, 2, 3, 4] are literals but 1/2 and range(5) are not.


More information about the Python-ideas mailing list