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 Jared Deckard
Recipients Jared Deckard, Paul Pinterits, docs@python, gvanrossum, levkivskyi, matrixise
Date 2018-07-23.17:13:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
typing_inspect is now filled with python version checks for 3.7. The implementation got significantly more complex when differentiating generics at runtime.

3.6 was undocumented, but the OO API was intuitive:

>>> T = typing.Union[int, float]
>>> assert T.__class__ == typing.Union
>>> assert T.__args__ == (int, float)

3.7 is less convenient and less consistent:

>>> T = typing.Union[int, float]
>>> assert T.__class__ == typing._GenericAlias
>>> assert T.__origin__ == typing.Union
>>> L = typing.List[int]
>>> assert L.__class__ == typing._GenericAlias
>>> assert L.__origin__ == list
Date User Action Args
2018-07-23 17:13:20Jared Deckardsetrecipients: + Jared Deckard, gvanrossum, docs@python, matrixise, levkivskyi, Paul Pinterits
2018-07-23 17:13:20Jared Deckardsetmessageid: <>
2018-07-23 17:13:20Jared Deckardlinkissue32752 messages
2018-07-23 17:13:20Jared Deckardcreate