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.)

-- 
\S

   under construction

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to