Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Introspection-based code completion"?

Tags:

python

ide

I'm looking at various IDEs for python. Looking at the official list the IDEs are categorized based on 'introspection based code completion'.

What does introspection based code completion mean?

Thanks.

like image 377
Sheldon Avatar asked Jun 05 '12 21:06

Sheldon


2 Answers

It means the IDE uses introspection to figure out what methods and variables are accessible from a given object, then allows quick code completion, usually by providing a list of options after you type a period following a symbol.

like image 97
Silas Ray Avatar answered Oct 05 '22 20:10

Silas Ray


Here's an example if WingIDE Pro inaction. Forgive the hastily thrown together image.

This is the image

You can see that arg1 is being shown as 1 in the first example, as well as the helper showing that it is probably an int.

In the second part, you can see that the IDE is looking through the docstrings for what the method get does, in the requests module.

The second image below shows that the IDE can 'auto-complete' code for you, including showing what it does. enter image description here

like image 28
TankorSmash Avatar answered Oct 05 '22 20:10

TankorSmash