Setting an attribute without calling __setattr__()

Hrvoje Niksic hniksic at xemacs.org
Fri Apr 25 17:16:36 EDT 2008


Hrvoje Niksic <hniksic at xemacs.org> writes:

> Joshua Kugler <jkugler at bigfoot.com> writes:
>
>>             self.me = []
>>             self.me = {}
>
> Use "object.__setattr__(self, 'me') = []" and likewise for {}.

Oops, that should of course be "object.__setattr__(self, 'me', [])".



More information about the Python-list mailing list