Message6583
The arguments to java.util.Arrays.asList(T... a) get treated as a single item instead of a series of items. This is does not match previous versions of Jython or how it works in native Java.
#Jython 2.5.2
import jarray
b = jarray().array([1, 2, 3, 4, 5], Integer)
a = java.util.Arrays.asList(b)
print a #[[Ljava.lang.Integer;@676825b5]
print b.__class__ # <type 'array.array'>
#Jython 2.1
import jarray
b = jarray().array([1, 2, 3, 4, 5], Integer)
a = java.util.Arrays.asList(b)
print a # [1, 2, 3, 4, 5]
print b.__class__ # org.python.core.PyArray |
|
Date |
User |
Action |
Args |
2011-07-25 13:23:00 | edwar187 | set | recipients:
+ edwar187 |
2011-07-25 13:23:00 | edwar187 | set | messageid: <1311600180.68.0.760181634064.issue1780@psf.upfronthosting.co.za> |
2011-07-25 13:23:00 | edwar187 | link | issue1780 messages |
2011-07-25 13:23:00 | edwar187 | create | |
|