On Tue, 2009-07-14 at 15:32 -0400, Joshua Judson Rosen wrote:
> > The simplistic self.foo = self.compute_foo() will trigger a call to
> > __getattr__, so you can't use that within __getattr__.
> 
> That's not true; it *will*, however, trigger a call to __settattr__,
> if it exists; that's what you're thinking of :)
> 
> cf. http://docs.python.org/reference/datamodel.html#object.__setattr__
> 
> __getattr__, however, is free to just do `self.foo = ...'.

Thanks for the correction.

-- 
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to