On Fri, 11 Dec 2009 11:36:13 +0000, Sion Arrowsmith wrote: > Steven D'Aprano <st...@remove-this-cybersource.com.au> wrote: >>thisModule = __import__(__name__) >>classToUse = thisModule.__dict__['C1'] > > Any reason to prefer this over: > > classToUse = getattr(thisModule, 'C1') > > ? (I think, for a module, they should do exactly the same thing. > Personally, I prefer keeping explicit references to __special names__ to > a minimum.)
No, no reason at all. I just forgot about getttr. -- Steven -- http://mail.python.org/mailman/listinfo/python-list