New submission from Erik Allik:

This is either a bug, or a very weird but undocumented feature/caveat.


def fn1():
    while True:
        try:
            raise Exception()
        finally:
            pass
def fn2():
    while True:
        try:
            raise Exception()
        finally:
            break  # <-----
fn1()  # exception, as expected
fn2()  # silence!

----------
messages: 171168
nosy: eallik
priority: normal
severity: normal
status: open
title: break in finally discards exception
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16028>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to