Message5830
Given a java class that can work with PyArrays within the following methods:
class MyJava {
MyJava(int[]);
int[] getArray();
PyObject __add__(PyObject);
PyObject __radd__(PyObject);
}
Then the commutative property is lost:
a=MyJava([1,1])
b=jarray.array([1,1],'i')
a+b
b+a # ERROR
In Jython-2.1 this worked, but in Jython-2.5 an error is raised because only PyArray types can be considered in the hard-wired implementation of PyArray?
I tried to add a new PyBuiltinMethod for PyArray, but that road seems also to be blocked becuse it is considered a builtin type.
Possible workaround (other than hacking the Jython code) would also be appreciated. |
|
Date |
User |
Action |
Args |
2010-06-22 12:59:58 | babelmania | set | recipients:
+ babelmania |
2010-06-22 12:59:57 | babelmania | set | messageid: <1277211597.77.0.882629458506.issue1622@psf.upfronthosting.co.za> |
2010-06-22 12:59:57 | babelmania | link | issue1622 messages |
2010-06-22 12:59:55 | babelmania | create | |
|