setattr(obj, key, value). -aj --On Sonntag, 2. März 2003 17:08 +0100 Fernando Martins <fmartins@hetnet.nl> wrote:
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
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- --------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------