[Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable
Edward Ned Harvey (python)
python at nedharvey.com
Sat Apr 29 17:47:36 EDT 2017
> From: Ivan Levkivskyi [mailto:levkivskyi at gmail.com]
> You should use List[int] (note capital first letter) and similar for other generic
> Please read https://docs.python.org/3/library/typing.html
> The fact that this is accepted by PyCharm is a PyCharm bug, and should be
> reported on their tracker.
Thank you. I've reported the issue to jetbrains, and also reported the jetbrains help page for type hinting in pycharm, which describes and provides examples using lowercase, and is where I learned about python type hinting. Based on what you've said, it appears it's both a pycharm bug, and also a jetbrains documentation bug.
More information about the Python-Dev