I know python is dynamically typed language but want to know if this is possible, lets say I have a list of class Person called people
people = []
people.append(Person('james'))
for p in people :
p.name = p.name + '_'
Is there a way to specify the type of p, something like this:
for p:Person in people :
p.name = p.name + '_'
The reason I ask for this is because p seems to be treated as type any/object by the IDE, no property is being recognized by the intellisense when I type p. I'm using vsCode with the python plugin
Could a list comprehensions help me solve this or is this just a problem with the IDE not detecting the type ? - https://stackoverflow.com/a/30129220/17205969


