Re: [Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable

2017-04-29 Thread Edward Ned Harvey (python)
> From: Ivan Levkivskyi [mailto:levkivs...@gmail.com] > > You should use List[int] (note capital first letter) and similar for other > generic > types. > 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 > reporte

Re: [Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable

2017-04-29 Thread Ivan Levkivskyi
You should use List[int] (note capital first letter) and similar for other generic types. 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. -- Ivan On 29 April 2017 at 14:32, Edward Ned

[Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable

2017-04-29 Thread Edward Ned Harvey (python)
Years ago, I fell in love with python and left C an C++ behind. Sometime later, I fell in love with C# because with strong typing, my IDE does most of the work for me - I never have to browse the API to find which method or attribute exists in a class, I can use tab completion for everything, av