you can also use : >>> class A(object): def __init__(self, **args): self.__dict__.update(args) >>> a=A(source='test', length=2) >>> a.source 'test' but this is to be used carefully because mispelling your args somewhere in your program will not raise any error : >>> A(sourc='test', lenth=2) Daniel