Sometimes I write projects and do not return to them until several months. Unfortunately, for me, I forgot what was intended to pass the function. I would like to be able to hover over the argument and see a type such as integer, string, some class, etc. Is there an IDE that will do this for me? Any help is appreciated.
It is not possible to infer a type normally, so no IDE can do this. Why not just use docstrings?
def foo(a, b): """ Take your arguments back, I don't want them! a -- int b -- str """ return a, b
In Python 3, you can also use function annotations:
def foo(a: int, b: str): """Take your arguments back, I don't want them!""" return a, b
Python , . Python , .
, any True, . bool to bool? . , , , . , , , , , , . , , , any -, . python ( ) true/false , bools.
any
True
"" Python, , . , , . IDE, , , .
, , / . , , .
PyCharm CTRL , . PyCharm , python3.