On Sat, Sep 5, 2020 at 12:43 AM Greg Ewing <[email protected]>
wrote:

> On 5/09/20 10:15 am, Chris Angelico wrote:
> > Remember that if this matters to you, you can "from math import inf".
>
> But you still need to use full eval on your repr, which could
> be a serious security problem in some contexts. If it were a
> built-in constant, ast.literal_eval could be used instead.
>

In most such cases you could use Python's json module which supports
Infinity.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/GTGMKE3ZTWX2T33CHFMLGA2UVXUQKB5J/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to