Title: Fun with python Date: 2012-11-15 11:51 What does this snippet print ? :::python def my_function(): try: return 1/0 except Exception: return "Exception" finally: return "Finally" print my_function() Result: :::bash $ python snippet.py finally This black magic is [explained][]in the documentation: > When return passes control out of a try statement with a finally > clause, that finally clause is executed before really leaving the > function. You can know ask this uncomfortable questions to your favorite python developer :) [explained]: http://docs.python.org/2/reference/simple_stmts.html#return