Message6583

Author edwar187
Recipients edwar187
Date 2011-07-25.13:23:00
SpamBayes Score 2.0099537e-06
Marked as misclassified No
Message-id <1311600180.68.0.760181634064.issue1780@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-07-25 13:23:00edwar187setrecipients: + edwar187
2011-07-25 13:23:00edwar187setmessageid: <1311600180.68.0.760181634064.issue1780@psf.upfronthosting.co.za>
2011-07-25 13:23:00edwar187linkissue1780 messages
2011-07-25 13:23:00edwar187create