Does Python do try: except: finally: ?

Joseph Wilhelm jwilhelm at outsourcefinancial.com
Wed Mar 19 16:14:11 EST 2003


On Wed, 2003-03-19 at 13:51, Jerry Seutter wrote:
> Does Python do a block like:
> 
> try:
>     do_something()
> except:
>     do_something_else()
> finally:
>     do_cleanup()
> 

>>> try:
...     print "Foo"
... except:
...     print "Oof"
... else:
...     print "Bar"
...
Foo
Bar
>>>


That what you need?

--Joseph Wilhelm






More information about the Python-list mailing list