8 Sep 2020 8 Sep '20
On Tue, Sep 8, 2020 at 9:21 AM Christopher Barker email@example.com wrote:
I’m actually liking this more as I think about it. And it seems it wouldn’t actually break any code that currently defines those names. And in many cases, it would do the same thing as those names currently do, if a bit differently.
That is, if you removed:
from math import inf
From your code, nothing would break.
Everything would break. On versions prior to the one that introduced the new literal form, you MUST have that line, or your code won't work. On versions starting with that one, you MUST NOT have that line, as it would be a SyntaxError. That's an awful lot of breakage for such a tiny benefit.