rtobar pushed to branch branch/fix-tp-iternext at PyPy / pypy
Commits: 2840677d by Rodrigo Tobar at 2023-07-05T21:11:04+08:00 Let tp_iternext raise StopIteration more selectively First, we can deal with the situation of handling an exception or not from the same wrapped function, using a variable to control whether StopIterations should be raised or swallowed. Then, the value of such variable is calculated before the wrapped function is created, and is calculated from a hardcoded list of types that are known to raise StopIteration in their tp_iternext implementations. --HG-- branch : fix-tp-iternext - - - - - 840f363a by Rodrigo Tobar at 2023-07-05T21:11:17+08:00 Add test for tp_iternext with a generator --HG-- branch : fix-tp-iternext - - - - - 2 changed files: - pypy/module/cpyext/slotdefs.py - pypy/module/cpyext/test/test_typeobject.py View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/aaa46d50dcaf17b1de89e18723eb4f01b1d7f81c...840f363aaaa9d75b9703c73ff53793a69fee5269 -- View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/aaa46d50dcaf17b1de89e18723eb4f01b1d7f81c...840f363aaaa9d75b9703c73ff53793a69fee5269 You're receiving this email because of your account on foss.heptapod.net.
_______________________________________________ pypy-commit mailing list -- pypy-commit@python.org To unsubscribe send an email to pypy-commit-le...@python.org https://mail.python.org/mailman3/lists/pypy-commit.python.org/ Member address: arch...@mail-archive.com