On 2006-01-11, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Charles Krug wrote:
>
>> What I'd like is to do something like this:
>>
>> factoryFile = sys.argv[1] # we assume that argv[1] implements a
>> # correct ThingMaker interface.
>
> sys.argv[1] is a string, so I assume
Charles Krug wrote:
> What I'd like is to do something like this:
>
> factoryFile = sys.argv[1] # we assume that argv[1] implements a
> # correct ThingMaker interface.
sys.argv[1] is a string, so I assume that you meant to say that
the module named by argv[1] implements
List:
I have an idea for an abstract factory that parameterizes the factory
with an input module.
The general ideom can be expressed thus:
class ThingFactory(object):
def CreateThisThing() : return ThisThing()
def CreateThatThing() : return ThatThing()
def CreateTheOtherThing() : ret