I've been looking at it, and I'm trying to figure out if it's a byproduct of me using the ast wrong.  I'm putting the Assign object in the value field of the Expr object (changing the expression a.set(1) into the assignment a=1).  An Assign is a stmt, but the value field for the Expr in the Java code expects a expr.  Looking back at the ast description at
http://docs.python.org/library/ast.html  it looks like expr is a descendant of stmt.  So my code may be constructing a illegal tree.  The unparse.py code is still able to deconstruct it back into code, but adding in the java type checking reveals the bad tree...
I'm going back to my original code to see if replacing the Expr node in it's parent's list fixes the problem.

Don't kill the issue just yet, I need to make sure I'm right on this one.

Kyle


On Mon, Oct 26, 2009 at 11:55 AM, Frank Wierzbicki <report@bugs.jython.org> wrote:

Frank Wierzbicki <fwierzbicki@users.sourceforge.net> added the comment:

Kyle: Thanks for the extra analysis, it looks like it could be the
problem. I'll take a look at that part of the code soon to see if this
will fix your issues.  FYI down the road I'm planning a rewrite of
ast.py based on a better understanding of CPython's ast.py.

_______________________________________
Jython tracker <report@bugs.jython.org>
<http://bugs.jython.org/issue1427>
_______________________________________