Christof Winter <[EMAIL PROTECTED]> writes: > To get rid of the if statements, replace __init__ function with: > > def __init__(self, tc): > functionToCall = eval("self.testCase%s" % tc)
Or functionToCall = getattr(self, "testCase" + tc) eval can introduce unwanted side effects. -- http://mail.python.org/mailman/listinfo/python-list