On Sat, Sep 5, 2020 at 5:21 PM Cade Brown <brown.c...@gmail.com> wrote:
> [...] we could spent all day going over particular cases which the repr -> > eval identity doesn't hold. However I still think that, as a principle, > it's a solid one. I think changing the repr of 'inf' to 'float('inf')' is a > decent solution (but keeping str conversion the same). > > So, I guess in order to reduce backwards incompatibility, the repr could > be modified to return a string which actually generates an infinite value > I would assume that there's a lot of code, much of it not written in Python, that has been written to specifically look for this "inf" string. So I don't think we should change it. And making the repr() of floats different from their str() just in this one special case sounds like a bad idea too. I don't think we could fix this one without making 'inf' a builtin constant, and I don't like that option at all. I also don't think this is quite as big a deal as it seems to have become in your head. So please put it to rest. There are many other worthy causes. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/OXACVYNKI7LHVFWYXVFEWFY25NX6NZLD/ Code of Conduct: http://python.org/psf/codeofconduct/