[python] using try: finally: except

Mahrt, Dallas dallasm at aiinet.com
Fri Jun 25 14:03:26 EDT 2004


> This is a fictional example of  what I want....
> 
> try:
>     x = 'hello'
> except Exception, e:
>     print "oops"
> finally:
>     y = 'world'
>     print x," ", y

try:
	try:
		x = 'hello'
	except Exception, ex:
		print "oops"
		raise # to make the point further
finally:
	y = 'world'
	print x," ", y

-
Dallas <dallas AT mahrt.org>




More information about the Python-list mailing list