[New-bugs-announce] [issue45662] Incorrect repr of InitVar of a type alias

Serhiy Storchaka report at bugs.python.org
Thu Oct 28 15:46:03 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The repr of InitVar preserves type aliases from the typing module, but not builtin.

>>> import typing, dataclasses
>>> dataclasses.InitVar[typing.List[int]]
dataclasses.InitVar[typing.List[int]]
>>> dataclasses.InitVar[list[int]]
dataclasses.InitVar[list]

----------
components: Library (Lib)
messages: 405241
nosy: eric.smith, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Incorrect repr of InitVar of a type alias
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

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


More information about the New-bugs-announce mailing list