Eric Walker wrote: > ahh, you just blew smoke in my face. :) > > I have a class with attributes. These attributes eventually have the value of > some lines in a file. I am now going back through my object list of that > class and assigning values to the attributes depending on another variable > that will change and be the same names like the class attribute names. I > want to use that change in name to be able to access the attribute and set > its value. Did I say that right????
Use getattr() to read an attribute by name and setattr() to set it. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor