Open
Description
Bug report
Bug description:
Moving some code from 'TypeAlias' to the new PEP 695 'type', I was expecting that typing.get_args would behave the same way.
I am wrong!
But I can't tell if it's a bug or not.
If not, maybe the documentation should tell.
Easy to reproduce:
>>> from typing import get_args, Literal, TypeAlias
>>> T1: TypeAlias = Literal["a", "b"]
>>> get_args(T1)
('a', 'b')
>>> type T2 = Literal["a", "b"]
>>> get_args(T2)
()
>>> Point1: TypeAlias = tuple[float, float]
>>> get_args(Point1)
(<class 'float'>, <class 'float'>)
>>> type Point2 = tuple[float, float]
>>> get_args(Point2)
()
CPython versions tested on:
3.12
Operating systems tested on:
Windows