This may be what you need: class foo: def __init__(self, a, b): self.a = a self.b = b
vars = [1,2,3,4,5,6] objects = [foo(a, 1) for a in vars] Note that in Python the new is expressed wit the () at the end: > f = new foo() Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list