-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Closed
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
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:
cpython/Python/generated_cases.c.h
Lines 4499 to 4502 in efcc968
| null = NULL; | |
| } | |
| stack_pointer[-3] = attr; | |
| if (oparg & 1) stack_pointer[-2] = null; |
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir