intelisense - supressing private attributes

Apr 13, 2012 at 3:10 PM


intelisense shows private attributes of the variables. I think they should not be listed.

Similar situation take place when content of the module is used by intelisense. Content of the __all__ is not respected. Symbols starting with _ are listed.

I do understand that seeing everything has its merit (personally I prefer to see private parts as well), but I have a use case with users who will be confused.

I propose to add a configuration option to control visibility of private attributes.



Apr 13, 2012 at 5:47 PM

Guido's time machine saves the day - you can use Tools->Options->Text Editor->Python->General->Statement Completion->Hide Advanced Members to disable the displaying of private members. After enabling the option the private members will be hidden when attempting to use them from outside of the class. :)

We should definitely also respect __all__ though as well.  We currently respect it for our pre-computed analysis but the live intellisense ignores it.  It can be a little tricky at times (because Python code will do things like append to __all__) but could you open a feature request for this?

Apr 13, 2012 at 9:30 PM

I have to admit, I did not search in the right place in Options, for the second part it is done: