Message11768

Author jeff.allen
Recipients jamesmudd, jeff.allen
Date 2018-03-08.08:43:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520498640.29.0.467229070634.issue2645@psf.upfronthosting.co.za>
In-reply-to
Content
We don't claim that LinkedList is a Python list which would imply the expected behaviour (or even a collections.MutableSequence), so I think its pop method should do what LinkedList.pop is supposed to do. (Imagine the surprise if it did otherwise.)

For me, your example calls slightly into question that java.util.List should have all the methods of a Python list. Or at any rate, reminds us of the limitations of that idea.

>>> from java.util import LinkedList, ArrayList, List, Deque
>>> List.pop
<method 'pop' of 'java.util.List' objects>
>>> 'pop' in dir(List)
True

It must surely be the result of JavaProxyList (and PyJavaType). It only supplies the implementation of interface methods not already provided by the actual class.

Would you be content to agree this is not a bug?
History
Date User Action Args
2018-03-08 08:44:00jeff.allensetmessageid: <1520498640.29.0.467229070634.issue2645@psf.upfronthosting.co.za>
2018-03-08 08:44:00jeff.allensetrecipients: + jeff.allen, jamesmudd
2018-03-08 08:44:00jeff.allenlinkissue2645 messages
2018-03-08 08:43:59jeff.allencreate