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 levkivskyi
Recipients gvanrossum, josh.r, levkivskyi, sproshev
Date 2018-04-22.09:49:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524390548.17.0.682650639539.issue33315@psf.upfronthosting.co.za>
In-reply-to
Content
I think this issue appeared previously on typing tracker. The current recommendation is to escape problematic annotations with quotes:

q: 'Queue[int]'

I don't think it will be added to typing, because following this way typing will grow infinitely to include all generics in stdlib.

Another solution may be to add a simple `__class_getitem__` to `Queue` that will just return `cls` (so that we don't import `typing`). Although it will skip all the normal typing checks (so that `Queue[42]` will not raise at runtime), static type checkers like mypy will flag such errors. Guido, what do you think about such experiment?
History
Date User Action Args
2018-04-22 09:49:08levkivskyisetrecipients: + levkivskyi, gvanrossum, josh.r, sproshev
2018-04-22 09:49:08levkivskyisetmessageid: <1524390548.17.0.682650639539.issue33315@psf.upfronthosting.co.za>
2018-04-22 09:49:08levkivskyilinkissue33315 messages
2018-04-22 09:49:07levkivskyicreate