Well, think about it: if you didn't have quotes, you'd have
The question isn't specific to
getattr(Person, age)Of course, Python would look for a variable called
age
. What else could it do?The question isn't specific to
getattr
, though.