suppose I have a dict like that:
dict = {'people': [<Bob>], 'animals': [<Frank>]}
Bob and Frank are two objects with attributes:
Bob = MethodForCreateAPerson(){ Frank = MethodForCreateAnimals(){
name = 'Bob', name = 'Frank',
age = 30, age = 6,
sex = 'm' sex = 'w'
} }
The Question is:
How can I access Bob's and Frank's attributes when they are values of a dict?
In other words, I need to check the attributes of the objects returned from dict.values().
Thanks for help
[<Bob>]? A list with an object? An object? A string inside a list?dict['people'][0].namenot enough? Seems like you have a dictionary from strings to lists of objects.TypeError: 'BoundField' object does not support indexingmost probably because you don't have list of objects instead you have single object. Can you confirm?