Advanced Python
Q93 / 101

What is Python's frame object and how does the CPython eval loop use it?

Correct! Well done.

Incorrect.

The correct answer is B) A C struct holding the execution state of a function call (locals, code object, instruction pointer); the eval loop interprets bytecode using it

B

Correct Answer

A C struct holding the execution state of a function call (locals, code object, instruction pointer); the eval loop interprets bytecode using it

Explanation

Each function call creates a PyFrameObject. The CPython bytecode eval loop (ceval.c) reads opcodes from f_code.co_code and uses f_localsplus for locals and the stack.

Progress
93/101