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:
Mark Shannon 2020-07-17 11:44:23 +01:00 committed by GitHub
parent 8e836bb21c
commit cb9879b948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 155 additions and 95 deletions

View file

@ -881,7 +881,7 @@ And more, added later.
>>> i.gi_running = 42
Traceback (most recent call last):
...
AttributeError: readonly attribute
AttributeError: attribute 'gi_running' of 'generator' objects is not writable
>>> def g():
... yield me.gi_running
>>> me = g()