Skip to content

dis [docs]: LOAD_SUPER_ATTR should push NULL instead of None if the lowest bit is set #117339

Description

@Christopher-Chianelli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions