Quoting James Henstridge <[EMAIL PROTECTED]>:

> Just as an idea, what would people think about using the __getattr__ and
> __setattr__ functions to get and set widget data.  This would require
> altering the current __getattr__ routines to call their parent's
> __getattr__ method for unknown attributes.  This would fix most of the
> wierdness people encounter in pygtk.
>
> What do people think?

That would be *great*. It would make Gtk behave much more "pythonian".
And I don't think that you have to alter __getattr__: If __getattr__ calls
wid.get_data(tag), then this works no matter in which level the custom
attribute has been set and if it's a attribute of the class, then
Python won't call __getattr__ for it (__getattr__ is only called if an
attribute is not known).

--
Aaron "Optimizer" Digulla             Team AMIGA     AROS Head of Development
Author of XDME, ResTrackLib, CInt.                     <http://www.aros.org/>
"(to) optimize: Make a program faster by improving the algorithms rather than
by buying a faster machine."                               <[EMAIL PROTECTED]>
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to