[pygtk] dynamic namespace
Johan Dahlin
jdahlin at async.com.br
Sat Jul 29 08:45:11 WST 2006
Rafael Espíndola skrev:
> The attached implementation of _lazyutils.py moves most of the logic
> from __getattribute__ to __getitem__. This makes it possible to assume
> that
>
> gtk.foo == gtk.__dict__['foo']
>
It won't work, because you cannot override __dict__ on a PyModule_Type.
The generated code uses PyModule_GetDict on the gtk module,
__getattribute__ will not even be called for that attribute access.
Johan
More information about the pygtk
mailing list