17 Jul
2009
17 Jul
'09
6:44 p.m.
On Fri, Jul 17, 2009 at 4:41 PM, Michael<fuzzyman@gmail.com> wrote:
Here are two examples of why allowing return inside a finally block is a bad idea:
def f(): try: return 3 finally: return 4
def f(): try: raise Exception() finally: return 4
Do you have real code that suffers from this problem? Is this a common mistake for Python beginners? Collin Winter