>>> def print_then_return():
... try:
... return "returns"
... finally:
... print "finally"
...
>>> print_then_return()
finally
'returns'
>>> def override_return():
... try:
... return "returns"
... finally:
... return "finally"
...
>>> override_return()
'finally'
No comments:
Post a Comment