[New-bugs-announce] [issue21992] New AST node Else() should be introduced
report at bugs.python.org
Wed Jul 16 18:13:48 CEST 2014
New submission from Igor Bronshteyn:
Quoting Collin Winter:
"I'd like there to be an Else() node for If.orelse, While.orelse, etc. My motivation is that I need the lineno and col_offset values of the "else" statement for a code-coverage utility; as it is, I have to find the last lineno of the if/while/etc suite and the first lineno of the "else" suite and then search between those two for the "else" statement."
Lack of position for "else" token hampers implementing of even simple static analysis checker that calculates NCNB (non-comment non-blank) lines (e.g. in a function).
components: Interpreter Core
title: New AST node Else() should be introduced
versions: Python 2.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce