Re: PyWart: Python modules are not so "modular" after all!

2013-11-11 Thread Rick Johnson
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

Re: PyWart: Python modules are not so "modular" after all!

2013-11-10 Thread Steven D'Aprano
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()