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."

from: http://bugs.python.org/issue1659410
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
messages: 223229
nosy: Igor.Bronshteyn
priority: normal
severity: normal
status: open
title: New AST node Else() should be introduced
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to