[Zope] error with setattr

Fernando Martins fmartins@hetnet.nl
Sun, 2 Mar 2003 17:08:28 +0100


Hi,

I tried this simple script (adapted from the Python tutorial):
__________________
class Record:
    pass

obj=Record()
obj.setattr('field1',1)
print obj
return printed
__________________

and got this error

Error Type: AttributeError
Error Value: Record instance has no attribute 'setattr'

Why is it not working?

Fernando