Documentation
The docs for LOAD_SUPER_ATTR currently states
The low bit of namei signals to attempt a method load, as with LOAD_ATTR, which results in pushing None and the loaded method. When it is unset a single value is pushed to the stack.
However, LOAD_METHOD/LOAD_ATTR push NULL to the stack, not None:
LOAD_ATTR
Otherwise, NULL and the object returned by the attribute lookup are pushed.
Additionally, the code for LOAD_SUPER_ATTR seems to push NULL instead of None too:
|
null = NULL; |
|
} |
|
stack_pointer[-3] = attr; |
|
if (oparg & 1) stack_pointer[-2] = null; |
Linked PRs
Documentation
The docs for LOAD_SUPER_ATTR currently states
However, LOAD_METHOD/LOAD_ATTR push NULL to the stack, not None:
LOAD_ATTR
Additionally, the code for LOAD_SUPER_ATTR seems to push NULL instead of None too:
cpython/Python/generated_cases.c.h
Lines 4499 to 4502 in efcc968
Linked PRs