John Salerno wrote: > Here's another question that is related: > > while True: > year = raw_input('Enter year (or other character to quit): ') > try: > year = int(year) > except NameError: > break > ... > raw_input() > > This works as expected, except that if you enter any character other > than a number, the program just quits. Why doesn't it still execute the > raw_input function and pause?
Here's a clue: try: try: x = int('abc') except FloatingPointError: print 'never reached' print 'This is not reached either' except ValueError: print 'proper exception' raw_input('Pause and reflect:') --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list