On Monday, November 11, 2013 1:34:54 AM UTC-6, Steven D'Aprano wrote:
> import sys
> sys.modules["mymodule"] = any_object_you_like()
Thanks for this great advice!
I'm not particularly fond of injecting names and objects in
this manner due to the "surprise factor", especially when
the names are go
On Sun, 10 Nov 2013 20:13:45 -0800, Rick Johnson wrote:
> What good is ANY namespace when you cannot override it's fundamental
> interface? And interfaces are the key to OOP!
>
> Is __setattr__/__getattr__ ringing a bell people?
import sys
sys.modules["mymodule"] = any_object_you_like()