Metaclasses broke in 2.2?
drew_csillag at geocities.com
Wed Aug 15 01:55:48 CEST 2001
On Tue, Aug 14, 2001 at 06:35:01PM -0400, Guido van Rossum wrote:
> Thanks for the feedback, Drew!
> > From: Drew Csillag <drew_csillag at geocities.com>
> > Now to try and figure out why (I've heard about this stuff) my __getattr__
> > function is going into recursive death.
> Probably because it *always* gets called rather than only for missing
> attributes. The tutorial gives a brief example.
Bingo! A simple addition of:
rv = object.__getattr__(self, attr)
Did the trick.
More information about the Python-list