[issue42010] GenericAlias accepts indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +21640 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22667 ___ Python tracker ___

[issue42010] GenericAlias accepts indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
New submission from Ken Jin : While writing the docs for PEP 585's GenericAlias, I noticed that the following anti-pattern described in PEP 585 no longer throws an error when it should: >>> l = list >>> l[-1] Whereas in versions of Python before 3.9, a "TypeError: 'type' object is not