Gordon Airporte <[EMAIL PROTECTED]> wrote: > I'm wondering if this is might be bad practice. Sometimes when I need to
I hope not, 'cuz I suggested that years ago on the Cookbook (under the name of Bunch) with several successive refinements. > class Dummy: > pass > > Then when I need to pass some related data, Python lets me do this: > > prefill = Dummy() > prefill.foreground = 'blue' #"foreground" is made up on the fly > prefill.background = 'red' > prefill.pattern = mypattern > return prefill Sure, but you can do even better: class Dummy(object): def __init__(self, **kwds): self.__dict__ = kwds prefill = Dummy(foreground='blue', background='red', pattern=mypattern) return prefill Alex -- http://mail.python.org/mailman/listinfo/python-list