[Python-ideas] float('∞')=float('inf')
Joshua Landau
joshua at landau.ws
Fri Jul 12 17:29:40 CEST 2013
On 12 July 2013 16:14, Gerald Britton <gerald.britton at gmail.com> wrote:
> "Just because."
>
> so, maybe we should have the interpreter spit out ∞ instead?
I don't know whether this was a joke, but just as int("߅") spits out 5
and not ߅, there is no reason that float("inf") should split out
anything other than "inf".
> I get that we special case infinity. Its an IEEE thing. I can sure
> the next request coming: The various constants represented by unicode
> characters.
I don't see how one leads to the next. None thinks that that's a good
idea. This is a *very* restricted change that fits with what we have
already done.
I don't get the hostility to it. I do get the objections that this
isn't needed or that float() has a more restricted scope but this
overt dislike to this extent surprises me. This is *minor* extension
of the leniency there already is. I'm approximately neutral on the issue,
but I'm definitely not as negative as a lot of the reviews it's
getting.
More information about the Python-ideas
mailing list