On May 2, 3:04 pm, TkNeo <[EMAIL PROTECTED]> wrote: > On May 2, 1:58 pm, Nick J Chackowsky <[EMAIL PROTECTED]> > wrote: > > > > > TkNeo wrote: > > > WHAT ? > > > > This is crazy > > > Crazy like a fox? > > > a = [1, 2, 3] > > try: > > a.index(99) > > except: > > a.append(99) > > finally: > > print a.index(99) > > > MY question: which exception should I actually be catching there? > > ** Posted fromhttp://www.teranews.com** > > ofcouse try catch is going to work but in ideality the index function > should return a -1 and no way in hell crash.
Please refrain from making such inane comments after an hour or two of toying with a new language. Read a good tutorial first (e.g. http://diveintopython.org/toc/index.html) and come back if you have a real question. George -- http://mail.python.org/mailman/listinfo/python-list