
Sept. 5, 2020
4:21 p.m.
On 6/09/20 8:08 am, David Mertz wrote:
Lots of people have noted that being able to eval a repr is only a vague goal in Python, that works *often* at most.
Still, the fact that it *almost* works for floats, except for certain specific values, is a bit annoying. Maybe the solution is for the repr of a float to be float('inf') instead of just 'inf'. That still wouldn't work with literal_eval, but I've realised that literal_eval only works on tuples, not lists, so it's of limited use anyway. -- Greg