Hi! You can iterate over the internal dictionary:
>>> class Test: ... def __init__(self): ... self.x = 5 ... self.y = 6 ... self.z = "Hallo" ... >>> x = Test() >>> print x.__dict__ {'y': 6, 'x': 5, 'z': 'Hallo'} >>> for key, value in x.__dict__.items(): ... print key ... print value ... y 6 x 5 z Hallo >>> Consider using iteritems() instead of items() when you have a loop. Hope that helps :) Daniel -- http://mail.python.org/mailman/listinfo/python-list