Completion code in "for in" statement


Hello (Sorry for my English)

I have same class in python 2.7:

class aclass:

   member1 = 0

End I am writing code:

list = []

x = aclass()


for i in list:

   i.<I expect to see member1 in list members, but I do not see it>

Code working without problem.

Can it work?


1 comment

Python code can have any type added to a list. For example, you might do list.append(33) before your loop. Python and PyCharm can't do code completion in there because arrays don't have fixed-type members.


Please sign in to leave a comment.