Issue1415
Created on 2009-07-28.23:11:16 by kellrott, last changed 2009-08-04.23:57:43 by fwierzbicki.
File name |
Uploaded |
Description |
Edit |
Remove |
bug.py
|
fwierzbicki,
2009-08-03.17:57:17
|
.py file that reproduces this bug |
|
|
msg4958 (view) |
Author: Kyle (kellrott) |
Date: 2009-07-28.23:11:16 |
|
AST node creation does not work in Jython in the same way as it does in
CPython.
Example:
try:
#it's ast in Python 2.6
import ast
except ImportError:
#it's _ast in Python 2.5
import _ast
old_ast = 1
def astnode_genAssign( targets, value):
if ( old_ast ):
tmp = _ast.Assign()
tmp.targets = targets
tmp.value = value
tmp.lineno = 0
return tmp
else:
tmp = ast.Assign( )
tmp.targets = targets
tmp.value = value
tmp.lineno = 0
return tmp
A call to astnode_genAssign works in Python2.5 and Python2.6, but in
Jython 2.5 it produces:
tmp = ast.Assign( )
TypeError: Assign() takes 2-4 arguments (0 given)
|
msg4987 (view) |
Author: Frank Wierzbicki (fwierzbicki) |
Date: 2009-08-04.23:57:42 |
|
Fixed as of r6632
|
|
Date |
User |
Action |
Args |
2009-08-04 23:57:43 | fwierzbicki | set | status: open -> closed resolution: accepted -> fixed messages:
+ msg4987 |
2009-08-04 23:55:08 | fwierzbicki | set | title: ast Node creation -> ast Node creation fails with no arg constructors |
2009-08-03 17:57:17 | fwierzbicki | set | files:
+ bug.py resolution: accepted |
2009-08-03 17:49:41 | fwierzbicki | set | assignee: fwierzbicki nosy:
+ fwierzbicki |
2009-07-28 23:11:16 | kellrott | create | |
|