[Eric] Re: Question about

Mikhail termim at gmail.com
Tue May 27 21:53:12 BST 2008


Ok, sorry for the noise but I've typed in the wrong test code. Here is the reals
test case:

class MyError(Exception): pass
def test(x):
    d = {1:'1'}
    try:
        return d[x]
    except KeyError:
        raise MyError, 'not found'

for i in range(10):
    try:
        y = test(i)
    except MyError, msg:
        print msg, i
print 'DONE'






More information about the Eric mailing list