New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45662>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to