]> 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:21:15 +0000 (08:21 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Sep 2018 15:21:15 +0000 (08:21 -0700)
commit4ea64a25c207c18c3939d3899c8b7889970606c7
tree476990993813e08524898768eb87f1f0f3dc8abd
parentb54fc15e32a9faed9398ac8442728756cbbba89a
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