On 5/11/2012 12:35 AM, Michael Rene Armida wrote:
Given this source:
def do_something(val):
if val:
return 'a'
else:
return 'b'
How do I get the line number of the "else:" line, using the ast
module? The grammar only includes the 'orelse' list:
If(expr test, s
On 11/05/2012 05:35, Michael Rene Armida wrote:
Given this source:
def do_something(val):
if val:
return 'a'
else:
return 'b'
How do I get the line number of the "else:" line, using the ast
module? The grammar only includes the 'orelse' list:
If(expr test, stm
Given this source:
def do_something(val):
if val:
return 'a'
else:
return 'b'
How do I get the line number of the "else:" line, using the ast
module? The grammar only includes the 'orelse' list:
If(expr test, stmt* body, stmt* orelse)
...but 'orelse' is the list of