5 Sep
2020
5 Sep
'20
6:56 p.m.
On Fri, Sep 04, 2020 at 06:30:39PM -0400, Todd wrote:
It will break an ENORMOUS amount of code. Numpy has its own top-level "inf" variable. So all code that uses "from numpy import *" will break.
Yeah no. py> import builtins py> builtins.inf = "Hello world!" py> inf 'Hello world!' py> from numpy import * py> inf inf Making inf a keyword would certainly break code, but adding it to builtins would not. By the way, the numpy inf is a float, so literally the same value and type as the proposed inf/Infinity builtin. The only way you could tell them apart is by identity tests. -- Steve