You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Interpreter/frame/frame.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,9 @@ the opcode `34 GET_YIELD_FROM_ITER` makes sure the stack's top is an iterable ob
202
202
203
203
```
204
204
205
-
field **f_lasti** is 36, indicate that it's before the `38 YIELD_FROM`
205
+
field **f_lasti** is 36, indicate that it's after `38 YIELD_FROM`
206
+
207
+
in the end of `YIELD_FROM` the following code `f->f_lasti -= sizeof(_Py_CODEUNIT);` reset the `f_lasti` to the beginning of `YIELD_FROM`[Thanks to @RyanHe123](https://github.com/zpoint/CPython-Internals/issues/46)
0 commit comments