Hence why I said 'would', 'if' etc. And it was brought up/suggested, having singletons. It does naturally flow from having a built-in (much like having singletons for booleans does):
sugggesting that one reason that they were made keywords is that it's useful for them to be singletons, which is much harder to do (or at least use consistently) if the names can be reassigned.
But these float special values can't be singletons anyway -- they could come from anywhere, so you really don't want to have people doing:
(to be honest, to me it does make sense to have 'inf' singletons, but not for 'nan's. but, neither is part of the PEP).
'inf' is a very special value, and there are only 2 infinite floats (inf, -inf).
Having a singleton is useful also perhaps as a memory optimization (i.e. whenever creating a float from C, check if it is infinite, and if so, return a new reference to the global inf/-inf variable).
Again, this is not part of the PEP, so I don't think we want to spend much time discussing whether they should be singletons. For now, the answer seems to be: no
Thanks,
----
Cade Brown
Research Assistant @ ICL (Innovative Computing Laboratory)