[New-bugs-announce] [issue19378] Rename "line_offset" parameter in dis.get_instructions to "first_line"

Nick Coghlan report at bugs.python.org
Thu Oct 24 15:44:36 CEST 2013

New submission from Nick Coghlan:

The "line_offset" parameter in dis.get_instructions is the line number of the first line in the source file: http://docs.python.org/dev/library/dis#dis.get_instructions

Calling this an offset is a little confusing, since "offset" in the dis docs almost always refers to an instruction offset. Issue 17916 is likely to make this worse, since that will probably involve new "last_offset" and "current_offset" parameters to other APIs.

Renaming the parameter to "first_line" (since it sets the line number reported for the first line in the code object when iterating) should help make this less confusing.

messages: 201131
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Rename "line_offset" parameter in dis.get_instructions to "first_line"

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list