]> granicus.if.org Git - python/commit
Clarify that Type[SomeTypeVar] is legal (#9585)
authorMichael Lee <michael.lee.0x2a@gmail.com>
Wed, 26 Sep 2018 15:13:28 +0000 (08:13 -0700)
committerIvan Levkivskyi <levkivskyi@gmail.com>
Wed, 26 Sep 2018 15:13:28 +0000 (16:13 +0100)
commit130717fe58abb2ab9e7938207df0c130a2562747
treee4d1e736ea15853c2d68918381537beeff6e47c5
parentbb8165172ac2ef8c7092e8e82928cc7f5f310ab3
Clarify that Type[SomeTypeVar] is legal (#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).
Doc/library/typing.rst