Re:Pyre: Fast Type Checking for Python
by orf on Friday May 11, 2018 @12:43PM
(#17048791)
PyCharm, and perhaps other tools/editors, does introspect the code. It's not too hard to work out what protocols or interfaces an argument requires, e.g if you use it in a for loop it needs to be iterable, if you index or slice it then it needs to support that, if you add it to an integer etc etc.
It's not about the concrete types but instead about what protocols it supports.
It's not about the concrete types but instead about what protocols it supports.