mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)
* Merge gen and frame state variables into one. * Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.
This commit is contained in:
parent
8e836bb21c
commit
cb9879b948
9 changed files with 155 additions and 95 deletions
|
@ -938,6 +938,9 @@ class TestPEP380Operation(unittest.TestCase):
|
|||
res.append(g1.throw(MyErr))
|
||||
except StopIteration:
|
||||
pass
|
||||
except:
|
||||
self.assertEqual(res, [0, 1, 2, 3])
|
||||
raise
|
||||
# Check with close
|
||||
class MyIt(object):
|
||||
def __iter__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue