On 5/11/05, Steven Bethard <steven.bethard at gmail.com> wrote: > If you want the default to be that the exception gets re-raised > (instead of being suppressed as it is above), I think you could just > change the finally block to something like: > > finally: > if stmt_exit(*exc): > raise exc[0], exc[1], exc[2] > > That would mean that if any nonzero object was returned from __exit__, > the exception would be reraised. Oops. This should have been: finally: if not stmt_exit(*exc): raise exc[0], exc[1], exc[2] This would mean that if a function returned None (or any other "False" object) the exception would be reraised. Suppressing the reraising of the exception would require returning a nonzero object. STeVe -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4