Josh Rosenberg <[email protected]> added the comment:
None of the actual classes outside of the typing module support this either to
my knowledge. You can't do:
from collections import deque
a: deque[int]
nor can you do:
a: list[int]
Adding Queue to the typing module might make sense (feel free to edit it if
that's what you're looking for), but unless something has changed in 3.7 (my
local install is 3.6.4), it's never been legal to do what you're trying to do
with queue.Queue itself with the original type, only with the special typing
types that exist for that specific purpose.
----------
nosy: +josh.r
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33315>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com