Message4975

Author audetto
Recipients audetto
Date 2009-07-31.19:37:21
SpamBayes Score 1.561884e-10
Marked as misclassified No
Message-id <1249069041.34.0.717371820948.issue1419@psf.upfronthosting.co.za>
In-reply-to
Content
In both PyTuple and PyList there is a bug in indexOf since it does not
wrap the argument in a PyObject before calling indexOf in the underlying
List.

On the other hand lastIndexOf in both works properly and the same should
be done for indexOf.

Bad:

public synchronized int indexOf(Object o) {
     return list.indexOf(o);
}

Good:

public synchronized int lastIndexOf(Object o) {
     return list.lastIndexOf(Py.java2py(o));
}

What happens is that PyObject.equals(Object) is always false.
History
Date User Action Args
2009-07-31 19:37:21audettosetrecipients: + audetto
2009-07-31 19:37:21audettosetmessageid: <1249069041.34.0.717371820948.issue1419@psf.upfronthosting.co.za>
2009-07-31 19:37:21audettolinkissue1419 messages
2009-07-31 19:37:21audettocreate