On Tue, Jan 31, 2012 at 5:54 PM, Emmanuel Mayssat <emays...@gmail.com> wrote: > I have the following program. > I am trying to have index the attributes of an object using __getitem__. > Reading them this way works great, but assigning them a value doesn't > Is there a way to do such a thing?
For assignment, use __setitem__. Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list