Marc 'BlackJack' Rintsch: You give lot of comments and I agree with most of them.
> One idiom to solve this is: > def __init__(self, answers=None): > self.answers = answers or dict() I suggest to avoid such usage of or/and (expecially for newbies), that is triky and can produce bugs, and to use a more explicit if: def __init__(self, answers=None): if answers is None: self.answers = {} else: self.answers = answers If you are sure you can use 2.5+ (the enclosing of the if is optional, but helps readability): def __init__(self, answers=None): self.answers = ({} if answers is None else answers) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list