DavidR. — Might be true about other possible warnings, if it happens within the writeto method. But for crucial messages (which might be dangerous to keep going with the execution) they should really use exceptions, not warnings. However, the beauty of the “with” statement I think is that the scope of the “ignore” gets limited within that particular block. So you don’t have to redefine all the filters afterward to catch other warnings. That’s why the “with” statement can be a neat solution, I think.
This is nice, but wouldn’t you catch all existing warnings with this method, and then *ingore* other possible warning due to other situations?
Comment by DavidR. — Wednesday, December 29, 2010 @ 14:26 |
DavidR. — Might be true about other possible warnings, if it happens within the writeto method. But for crucial messages (which might be dangerous to keep going with the execution) they should really use exceptions, not warnings. However, the beauty of the “with” statement I think is that the scope of the “ignore” gets limited within that particular block. So you don’t have to redefine all the filters afterward to catch other warnings. That’s why the “with” statement can be a neat solution, I think.
Comment by nomo17k — Wednesday, December 29, 2010 @ 15:02 |