From: <fwi...@us...> - 2009-04-10 03:57:56
|
Revision: 6201 http://jython.svn.sourceforge.net/jython/?rev=6201&view=rev Author: fwierzbicki Date: 2009-04-10 03:57:54 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Pesimistic copy of list if not a PySequence and not a java.util.List. Needed to pass test_userlist, but feels like we could avoid sometimes, but how to check? Modified Paths: -------------- branches/newlist/src/org/python/core/PyList.java Modified: branches/newlist/src/org/python/core/PyList.java =================================================================== --- branches/newlist/src/org/python/core/PyList.java 2009-04-10 03:53:07 UTC (rev 6200) +++ branches/newlist/src/org/python/core/PyList.java 2009-04-10 03:57:54 UTC (rev 6201) @@ -135,6 +135,8 @@ } setsliceIterator(start, stop, step, value.asIterable().iterator()); } else if (!(value instanceof List)) { + //XXX: can we avoid copying here? Needed to pass test_userlist + value = new PyList(value); setsliceIterator(start, stop, step, value.asIterable().iterator()); } else { System.err.println("List"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |