2 Mar
2003
2 Mar
'03
4:55 p.m.
Andreas Jung wrote: setattr(obj, key, value).
Ah! it's not a method. Somehow I thought obj meant self... Now, I'm getting the error: Error Type: TypeError Error Value: attribute-less object (assign or del) which is correct in the original version, but after adding a dummy field I still get the error. _____________________ class Record: field0 = 0 obj=Record() setattr(obj, 'field1', 1) print obj return printed ______________________ What silly mistake am I doing now? Thanks, Fernando