]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Clarify that Type[SomeTypeVar] is legal (GH-9585)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Sep 2018 15:23:23 +0000 (08:23 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Sep 2018 15:23:23 +0000 (08:23 -0700)
commitdfa11135ce53967ac97550d0a9343d32c9958ac0
treed704ee2c75515358a866db4904a336df42624fe8
parent3707bcf02b7574448d7137935995146f6e8ea810
Clarify that Type[SomeTypeVar] is legal (GH-9585)

Currently, the docs state that when doing `Type[X]`, X is only allowed to
be a class, a union of classes, and Any. This pull request amends
that sentence to clarify X may also be a typevar (or a union involving
classes, Any, and TypeVars).
(cherry picked from commit 130717fe58abb2ab9e7938207df0c130a2562747)

Co-authored-by: Michael Lee <michael.lee.0x2a@gmail.com>
Doc/library/typing.rst