Message3770
This now works. Thanks for the fix!
Now try to add this line at the end of the script:
print parse_expr("Integer(3)", {})
and run it:
$ python2.6 ast_test.py
<__main__.Integer object at 0xb7ba092c>
<__main__.Div object at 0xb7ba0b6c>
<__main__.Mul object at 0xb7ba0bac>
<__main__.Integer object at 0xb7ba0a6c>
$ jython ast_test.py
<__main__.Integer object at 1>
<__main__.Div object at 2>
<__main__.Mul object at 3>
Traceback (most recent call last):
File "ast_test.py", line 82, in <module>
print parse_expr("Integer(3)", {})
File "ast_test.py", line 75, in parse_expr
a = Transform(local_dict, global_dict).visit(a)
File "/home/ondra/repos/jython/dist/Lib/ast.py", line 256, in visit
return visitor(node)
File "/home/ondra/repos/jython/dist/Lib/ast.py", line 321, in
generic_visit
new_node = self.visit(old_value)
File "/home/ondra/repos/jython/dist/Lib/ast.py", line 256, in visit
return visitor(node)
File "/home/ondra/repos/jython/dist/Lib/ast.py", line 319, in
generic_visit
old_value[:] = new_values
TypeError: can only assign array (not "list") to array slice
And there will probably be couple more. I'll try to isolate it. |
|
Date |
User |
Action |
Args |
2008-11-10 07:13:57 | certik | set | messageid: <1226301237.7.0.526270472296.issue1168@psf.upfronthosting.co.za> |
2008-11-10 07:13:57 | certik | set | recipients:
+ certik |
2008-11-10 07:13:57 | certik | link | issue1168 messages |
2008-11-10 07:13:57 | certik | create | |
|