This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2022-03-05.10:18:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646475522.66.0.0981831027946.issue46927@roundup.psfhosted.org>
In-reply-to
Content
Currently, if you try to subscript a non-generic type you will get an error:

>>> int[str]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'type' object is not subscriptable

Yes, 'type' objects are usually not subscriptable, but list[str] works, and it is not clear from the error message for what type it is failed.

The following PR changes an error message:

>>> int[str]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: type 'int' is not subscriptable
History
Date User Action Args
2022-03-05 10:18:42serhiy.storchakasetrecipients: + serhiy.storchaka
2022-03-05 10:18:42serhiy.storchakasetmessageid: <1646475522.66.0.0981831027946.issue46927@roundup.psfhosted.org>
2022-03-05 10:18:42serhiy.storchakalinkissue46927 messages
2022-03-05 10:18:42serhiy.storchakacreate