Hi > You can't easily list the exceptions that your code could throw. There are > some obvious ones apart from IOError: say filename was an int (or even > certain strings) you would get TypeError, or you might get MemoryError or > KeyboardInterrupt. More obscurely, if you reused file as a global variable > you could generate any exception at all.
I undestand now, so it would be better to let it in the code in case it's triggered (I triggered it by passing int instead of str, as you said) I would at least know where to look I wouldn't call it "dead code" then ... dead code is more like if False: do_something() thank you Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list