Code Completion / IntelliSense Python 3.2

Feb 10, 2012 at 8:23 AM
Edited Feb 10, 2012 at 8:47 AM

Hi!

I'm having some trouble regarding the code completion feature using PTVS with CPython (3.2). The code completion seems to be working until a specific degree but not for all class members, methods, ... .

For example

 

import re // this works. As soon as i type import i get a list containing the different modules 

pattern = re.compile // this works too, as soon as i type in the . after re i get the modul members, functions ... 

pattern. // but this don't work, i get no methods for pattern. 

re.compile('X'). // even this way it don't works

Using IronPython however works. But as i want to code in Python 3.0 IronPython i not an option.

Do you have any ideas how to fix this please?

Thanks

Coordinator
Feb 10, 2012 at 5:43 PM

The reason this works w/ IronPython is that we can use .NET reflection to determine the types which are returned via various APIs.  With CPython we have to rely upon a potentially incomplete database of type information which we generate ahead of time.  We try our best to make sure that database is fairly complete but there could be cases where it falls down and it seems like you found one.

I'll open a bug and see if we can fix this particular case - it might involve hardcoding the type information for re.compile into our scraper though.

Coordinator
Feb 10, 2012 at 5:44 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 13, 2012 at 7:29 AM

@dinov

many thanks for your support