[issue32894] AST unparsing of infinity numbers

STINNER Victor report at bugs.python.org
Mon Apr 13 18:55:44 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

It seems like the fix works as expected:

>>> from __future__ import annotations
>>> def f(x: A[1e1000, 1e1000j]): pass
... 

>>> f.__annotations__
{'x': 'A[1e309, 1e309j]'}

>>> A=list
>>> eval(f.__annotations__['x'])
list[inf, infj]

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32894>
_______________________________________


More information about the Python-bugs-list mailing list