[issue2011] compiler.parse("1; ") adds unexpected extra Discard(Const(None)) to parse tree

Andrew Dalke report at bugs.python.org
Tue Feb 5 04:21:12 CET 2008


Andrew Dalke added the comment:

This really is a minor point.  I don't track the 3K list and I see now that the 
compiler module won't be in Python 3k - good riddance - so feel free to discard 
this as well as the other open compiler module bugs.

I want to experiment with adding instrumentation for branch coverage.  To do that I 
want to get the character ranges of each term in the AST.  The Python compiler 
module doesn't keep track of that so I'm developing a new parser based on PLY.

I've developed it and I'm now cross-checking the generated ASTs to verify they are 
identical.  In this case the compiler module generates an extra node in the AST so 
I had to add backwards compatibility support.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2011>
__________________________________


More information about the Python-bugs-list mailing list