|
From: Titus B. <ti...@ca...> - 2001-08-03 19:23:10
|
Hi, I'm having an interesting problem: in the following piece of code, when interpreted, --- try: (a, b, c) = string.split(s) except ValueError: print 'ERROR in input string, skipping line: %s' % (s,) -- if the split of s does not contain three elements, a ValueError is raised & caught appropriately. HOWEVER, if I use jythonc to compile the file into a .class, it turns out that a KeyError is raised in the same place for the same piece of code. I then need to change the except statement to: -- except (ValueError, KeyError): -- and it all works fine. Cheers, --titus |