Message9056

Author zyasoft
Recipients nonameentername, zyasoft
Date 2014-09-29.21:48:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412027287.16.0.81794830618.issue2215@psf.upfronthosting.co.za>
In-reply-to
Content
Much as we saw with #1631, java.util.List objects do not have all the list methods, so they do not duck type properly as Python list objects (or more properly collections.Sequence):

$ jython27
>>> from java.util import ArrayList
>>> x = ArrayList()
>>> x.append("foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'java.util.ArrayList' object has no attribute 'append'

Note that we actually make this guarantee, but don't fulfill it:
https://hg.python.org/jython/rev/9fef5da411e5

>>> from collections import Sequence
>>> isinstance(x, Sequence)
True

Fix for beta 4. Use list_tests support library (used by test_list) to verify ops. Also looks at comprehensive support for set.
History
Date User Action Args
2014-09-29 21:48:07zyasoftsetrecipients: + zyasoft, nonameentername
2014-09-29 21:48:07zyasoftsetmessageid: <1412027287.16.0.81794830618.issue2215@psf.upfronthosting.co.za>
2014-09-29 21:48:06zyasoftlinkissue2215 messages
2014-09-29 21:48:06zyasoftcreate