L
Lacrima
Hello!
I think I have a very simple question, but I can't understand how to
access object properties in a way described below.
For example I have an instance of any class:
def __init__(self):
self.name = 'John'
self.email = '(e-mail address removed)'
self.phone = '3453454'
Then I have a list of person's properties represented as strings:
And my question is how to access person's properties using prop_list?
Do I have to somehow convert 'name', 'email', 'phone'?
With regards,
Max.
I think I have a very simple question, but I can't understand how to
access object properties in a way described below.
For example I have an instance of any class:
def __init__(self):
self.name = 'John'
self.email = '(e-mail address removed)'
self.phone = '3453454'
Then I have a list of person's properties represented as strings:
prop_list = ['name', 'email', 'phone']
And my question is how to access person's properties using prop_list?
Do I have to somehow convert 'name', 'email', 'phone'?
With regards,
Max.