as an oldtimer, I know that in complex code the goto statement is still the easiest to code and understand.
I propose this solution using exception. The string exception is deprecated but is simpler for this example. # DeprecationWarning: raising a string exception is deprecated def Goto_is_not_dead(nIn): try: if (nIn == 1): raise 'Goto_Exit' if (nIn == 2): raise 'Goto_Exit' print 'Good Input ' + str(nIn) raise 'Goto_Exit' except 'Goto_Exit': print 'any input ' + str(nIn) if __name__ == '__main__': Goto_is_not_dead(2) Goto_is_not_dead(3) -- http://mail.python.org/mailman/listinfo/python-list