The earlier examples of the Source Assistant in action within example1.py didn't show some of its features because there are no classes in that file. Let's revisit it now with example2.py from your tutorial directory. Move the insertion cursor to the definition of the end_pre method in MyHTMLParser and place it on the word end_pre. You should see the following in the Source Assistant:
The Source Assistant also displays information about inherited classes when clicking on class names. For example, clicking on self.obj in the constructor (__init__()) of AnotherClass will display this:
Helping Wing's Analyzer: Notice the statement that reads isinstance(obj, MyHTMLParser) at the top of AnotherClass.__init__() in example2.py: This tells Wing's source analysis engine the type of obj. Python's design makes exhaustive analysis of object-oriented code difficult, but since type information is propagated by inference to other values (such as self.obj in this case), fairly few isinstance hints can go a long way to improving Wing's ability to show useful information in the auto-completer, Source Assistant, and other tools.
Since Wing's analysis engine ignores conditionals in code, the following can be used in a case where the isinstance would add a circular import bug to program execution:
if 0: import mymodule isinstance(myvalue, mymodule.MyClass)
|« 1.8. Tutorial: Searching||Table of Contents||1.10. Tutorial: Other IDE Features »|