Reputation: 2755
I am passing object as follows
test = TestClass(parameter1=''first_name', parameter2='last_name')
And in another method I am accessing parameter1 as
print test.parameter1
I get output as first_name
But if I have variable which contains value assigned to parameter1. Can I use variable to get value?
var = 'parameter1'
What's the right way to perform like test.var
? For this I get attribution error
.
What's the programming word for 'parameter1', is it options, argument options?
Upvotes: 0
Views: 33