]> granicus.if.org Git - python/commit
bpo-37814: Document the empty tuple type annotation syntax (GH-15208)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 13 Aug 2019 19:12:55 +0000 (12:12 -0700)
committerGitHub <noreply@github.com>
Tue, 13 Aug 2019 19:12:55 +0000 (12:12 -0700)
commit6ad902a08814909b4d52c4000d5a10ce58516dac
treef1a60fdcf3c0cb1a53ab752738fcd8c6064d03d0
parentee989512528d178d6f088916aba3e67ea9487ceb
bpo-37814: Document the empty tuple type annotation syntax (GH-15208)

https://bugs.python.org/issue37814:

> The empty tuple syntax in type annotations, `Tuple[()]`, is not obvious from the examples given in the documentation (I naively expected `Tuple[]` to work); it has been documented in PEP 484 and in mypy, but not in the documentation for the typing module.

https://bugs.python.org/issue37814
(cherry picked from commit 8a784af750fa82c8355903309e5089eb2b60c16b)

Co-authored-by: Josh Holland <anowlcalledjosh@gmail.com>
Doc/library/typing.rst