Message2762

Author cgroves
Recipients
Date 2007-07-30.04:14:35
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Committed in r3366.  

I'm guessing you switched from an array of PyObject in your patch to a Vector to accumulate the objects for the range because an array in java can only be up to Integer.MAX_VALUE in length.  Switching to a Vector doesn't actually get around that problem; a Vector uses an array for its internal storage, so it'll hit it too.  Since we use arrays internally in PyList as well, I just added a check to prevent a user from creating a range with more than Integer.MAX_VALUE items in it.  If someone actually has enough ram to do something like that, we can worry about it then.

Just as a general Java usage tip, there's no reason to use Vector instead of List in code that can use Java 1.2.  Vector is synchronized by default, but you can get that behavior on a List with Collections.synchronizedList.  Vector is used in Jython currently, but that's only because that code was written long, long ago.
History
Date User Action Args
2008-02-20 17:18:44adminlinkissue1761858 messages
2008-02-20 17:18:44admincreate