Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonCPython bytecode and disSingle-choice MCQ

Given the two functions below, why does dis show LOAD_FAST for the access inside cube but a different load opcode for the access to base inside the nested helper?

def cube(n): base = n def helper(): return base * base * base return helper()