Dennis Sweeney
Dennis Sweeney
I don't know if this has already been considered, but one approach might be to eliminate "`TOS`" terminology altogether and instead refer to `stack[-1]`, `stack[-2]`, `stack.pop()`, etc., borrowing the well-understood...
Does this add much extra CPU/stack/memory overhead for calling Python from C? Or alternating py/c/py/c/py calls? Probably not the most important use-cases, but I would hope that they wouldn't pessimize...
Unfortunately, I can reproduce the Windows failures locally. I get a segfault when `Py_DECREF(0x00000000ffffffff)` happens in some `POP_TOP` instruction. Running `.\python.bat -m test` with `lltrace=1` and commenting out `dump_stack()` gave...
> I believe e is always guaranteed to be bound, by construction. Not in the presence of an extra manually-added `del e`, right? ``` def f(): try: 1/0 except ZeroDivisionError...
It looks like the `e = None; del e` code was first added in issue https://github.com/python/cpython/issues/44437, commit https://github.com/python/cpython/commit/b940e113bf90ff71b0ef57414ea2beea9d2a4bc0. The mailing list thread leading up to the issue is here: https://mail.python.org/pipermail/python-3000/2007-January/005384.html...
Can you provide a minimal reproducible example? Maybe use [psutil](https://pypi.org/project/psutil/) to show memory usage over time. I tested with the script below (key/no-key,forward/reverse,exhausting/stopping,various lengths,various numbers of iterables) and could not...