Message3667

Author MrMeanie
Recipients MrMeanie, fwierzbicki
Date 2008-10-11.21:51:18
SpamBayes Score 5.978523e-11
Marked as misclassified No
Message-id <1223761879.88.0.683747381887.issue1148@psf.upfronthosting.co.za>
In-reply-to
Content
New patch (supercedes old one)


Apologies for this second patch.
The CollectionProxy modifications needed an update; no py->java
conversion was performed on objects coming from Python. This is fixed now.


Still to fix:


1) CollectionProxy.findCollection() checks the object to see if it is a
List instance, before checking for a Vector instance. This means that
Vectors will be given the default ListProxy, not a VectorProxy.

2) The modifications that I have made to ListProxy have not been made to
VectorProxy. In order that Vector objects can use negative indices and
slices too, the changes could either be copied to VectorProxy, or
VectorProxy could subclass ListProxy.

3) When wrapping a java Collection instance, PyInstance directs calls to
py-list methods (__getitem__ etc) to the CollectionProxy system. This is
fine, unless you:
   a) Create a class in java which implements List and provides a
__getitem__ method (for example)
     - or -
   b) Create a class in python which does the same.
In both cases, the method call is directed to the CollectionProxy,
instead of using the objects own implementation.
PyInstance could check the objects capabilities first, then try the
CollectionProxy, rather than the other way round.
History
Date User Action Args
2008-10-11 21:51:19MrMeaniesetmessageid: <1223761879.88.0.683747381887.issue1148@psf.upfronthosting.co.za>
2008-10-11 21:51:19MrMeaniesetrecipients: + MrMeanie, fwierzbicki
2008-10-11 21:51:19MrMeanielinkissue1148 messages
2008-10-11 21:51:19MrMeaniecreate