Setting an attribute without calling __setattr__()

animalMutha bhmckendrick at gmail.com
Sat Apr 26 17:17:52 CEST 2008



Hrvoje Niksic wrote:
> 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