[issue28884] Python 3.5.2 non-segfaulting bugs (from PyPy)

Armin Rigo report at bugs.python.org
Tue Dec 6 06:57:17 EST 2016


Armin Rigo added the comment:

(B6) this program fails the check for no sys.exc_info(), even though at
  the point this assert runs (called from the <== line) we are not in
  any except/finally block.  This is a generalization of
  test_exceptions:test_generator_doesnt_retain_old_exc::

    import sys

    def g():
        try:
            raise ValueError
        except ValueError:
            yield 1
        assert sys.exc_info() == (None, None, None)
        yield 2

    gen = g()

    try:
        raise IndexError
    except IndexError:
        assert next(gen) is 1
    assert next(gen) is 2    # <==

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28884>
_______________________________________


More information about the Python-bugs-list mailing list