How to instatiate a class of which the name is only known atruntime?

Erik Max Francis max at alcyone.com
Wed Sep 10 03:52:31 EDT 2003


Max M wrote:

> Is there any reason not to use a standard factory pattern for this? It
> is the normal approach.

Because introspection means you don't have to keep a separate list of
all possible values updated.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ An undevout astronomer is mad.
\__/  Edward Young




More information about the Python-list mailing list