I got the concept to get and set object attributes and now can handle
similar problems effectively.
Thanks to all for your help.
--
http://mail.python.org/mailman/listinfo/python-list
Hello to all
I am new to python. I am facing problem to use variables as object
attributes. I have to use loop and dynamically add attributes to a
object and for this purpose I have to use variables with object names.
For example-:
Let us say object car has an attribute engine, then
varname =
On 16 August 2010 19:23, Nitin Pawar nitinpawar...@gmail.com wrote:
you would need to define a class first with its attiributes and then you may
want to initiate the variables by calling the class initilializer
Actually I have to dynamically add attributes to a object. I am
writing python
@All
Thanks a lot.
getattr and setattr functions solved my problem.
--
http://mail.python.org/mailman/listinfo/python-list