Python function completion/suggestion does not work for the first time in FOR and IN

I am trying the pre-released Version 1.2.1139 and Version 1.2.1153

travel_with = ["bmw", "audi", "benz"]

for travel in travel_with:
    print(travel.title())

after entering "travel." in print function, there is no function suggestion for the first time you type the code. The function suggestion only shows up the second time after you run the codes.

Currently, RStudio's autocompletion only auto-completes based on variables already defined in the Python 'main' module -- that if, we don't perform any semantic analysis. Hence, within the for travel in travel_with, RStudio does not yet know what the type of travel is.

Could you file this as a feature request in https://github.com/rstudio/rstudio/issues?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.