Eric, Thanks, Ype > >> Untested code: >> >> def openread(fname): >> try: >> fp = open(fname) >> return fp.read() >> finally: >> fp.close() > fp = open(fname) > try: > return fp.read() > finally: > fp.close() > > If open throws, then the fp name will not be bound, so on the way out > the finally clause will generate a NameError.