This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kj
Recipients gvanrossum, kj, levkivskyi
Date 2020-12-25.15:19:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently get_args doesn't work for PEP 604 Union:

>>> get_args(int | str)

or new Callables with PEP 612:

>>> P = ParamSpec('P)
>>> get_args(Callable[P, int])
([~P], <class 'int'>)

get_origin doesn't work with PEP 604 Unions:

>>> get_origin(int | str)

PS: the fix has to be backported partly to 3.9. Because get_args doesn't handle either.
Date User Action Args
2020-12-25 15:19:22kjsetrecipients: + kj, gvanrossum, levkivskyi
2020-12-25 15:19:22kjsetmessageid: <>
2020-12-25 15:19:22kjlinkissue42740 messages
2020-12-25 15:19:22kjcreate