I was wondering why the try-except is slower than the if in the program below.
def tryway(): try: while True: alist.pop() except
defensive programming requires that one test for conditions which are rare and/or abnormal, some of which during the course of a year or many years will not occur, thus in these circumstances perhaps try-except may be justified.