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 JelleZijlstra
Recipients JelleZijlstra, gvanrossum, kj, serhiy.storchaka
Date 2022-04-08.05:07:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I tried out 3.11 on my pyanalyze type checker and got some failures because of this change, because my previous trick for distinguishing between Tuple and Tuple[()] failed.


>>> from typing import get_args, Tuple
>>> get_args(Tuple[()])
>>> get_args(Tuple)


>>> from typing import get_args, Tuple
>>> get_args(Tuple[()])
>>> get_args(Tuple)

However, the new behavior is more consistent: get_args(tuple[()]) always returned (). It's also easy enough to work around (just check `... is Tuple`).

I'll put a note in the What's New for 3.11 about this change.
Date User Action Args
2022-04-08 05:07:15JelleZijlstrasetrecipients: + JelleZijlstra, gvanrossum, serhiy.storchaka, kj
2022-04-08 05:07:15JelleZijlstrasetmessageid: <>
2022-04-08 05:07:15JelleZijlstralinkissue46981 messages
2022-04-08 05:07:15JelleZijlstracreate