Skip to content

Instantly share code, notes, and snippets.

@vstepchik
Created September 21, 2018 13:48
Show Gist options
  • Select an option

  • Save vstepchik/fd4f57b0827ae370fb5eae135e76a122 to your computer and use it in GitHub Desktop.

Select an option

Save vstepchik/fd4f57b0827ae370fb5eae135e76a122 to your computer and use it in GitHub Desktop.
from queue import Queue
a: Queue[int] = Queue()
# Traceback (most recent call last):
# File "__main__.py", line 3, in <module>
# a: Queue[int] = Queue()
# TypeError: 'type' object is not subscriptable
# however if i do:
# a = Queue() # type: Queue[int]
# it works fine
# using python 3.7.0, my colleague uses 3.7.0 as well, but does not have this problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment