Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow implementation details of dis.Instruction #11148

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions stdlib/dis.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if sys.version_info >= (3, 11):
end_col_offset: int | None = None

if sys.version_info >= (3, 11):
class Instruction(NamedTuple):
class _Instruction(NamedTuple):
opname: str
opcode: int
arg: int | None
Expand All @@ -60,7 +60,7 @@ if sys.version_info >= (3, 11):
positions: Positions | None = None

else:
class Instruction(NamedTuple):
class _Instruction(NamedTuple):
opname: str
opcode: int
arg: int | None
Expand All @@ -70,6 +70,9 @@ else:
starts_line: int | None
is_jump_target: bool

class Instruction(_Instruction):
def _disassemble(self, lineno_width: int = ..., mark_as_current: bool = ..., offset_width: int = ...) -> str: ...
tungol marked this conversation as resolved.
Show resolved Hide resolved

class Bytecode:
codeobj: types.CodeType
first_line: int
Expand Down