----- Original Message ----- From: "Gordon McMillan" firstname.lastname@example.org
That's not even part of import. import is done when it has [name1, name2, name3]. It's ceval.c that does the binding.
Yep, so I discovered.
Sounds to me like you want to override __setitem__ on the module's __dict__.
Not neccessarily, though that might be one approach. I might want to treat explicit setting of attributes differently from an import.
Tricky, 'cause a module is hardly in charge of its own __dict__.
But if you see value in it, you'd better persue it now, because Jeremy's plans for optimization of module __dict__ will likely make things harder.
I thought this /was/ pursuing it. What did you have in mind?