Python IDE with code completion, including object type parameter output

I tested many Python IDEs for their code completion capabilities. Is there one that can complete code completion in the following case:

def foo(x):
    print x.read()  // remove this line, and type in "print x."

def main():
    n = open("c:\\python27\\test.py");
    foo(n)

The IDE should find out that foo is called somewhere in the current module with a parameter that was the return value from the open () call that it would have to accept, is a call file.openand thus returns a file object. Thus, x.followed by Ctrl + Space, code completion is invoked and it is shown that x, as a file object, can support any method of a file object, including read().

I found that PyScripter, for example, can do this:

    n = open("c:\\python27\\test.py");
    n. // hit <ctrl+space> after n.

, PyScripter , , n , , , , .

-, Python 2.x , Python 3.x, , , IDE?

   def foo(x:'file'):
        print x.read()  // remove this line, and type in "print x." and hit ctrl+space
+5
2

, , (), PyCharm

:

Python2


Python 3, IDE :

Python3

( python 3, )

, IMHO .

+8

WingIDE , , .

+1

All Articles