1 2 3 4 5 6 7 8 9 10
class Foo(object): def __init__(self, color): self.color = color class Bar(object): fooFactory = Foo def quux(self): foo = self.fooFactory(<arg>"orange") #