On Sun, Dec 7, 2008 at 12:25 PM, Lie Ryan <lie.1296 at gmail.com> wrote: > texts = ["a = %s\n" % plan.a, > "b = %s\n" % plan.b, > "c = %s\n" % plan.c, > "d = %s\n" % plan.d > ] > > for text in texts: > try: > fo.write(text) > except AttributeError: > pass No, the AttributeError will come during the creation of texts, not in the loop. Kent