[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Color slice problem with Python 3



You'll need to add a mapping subscript function that checks for a
PySlice object rather then an index.

	if (PySlice_Check(key)) {
		int len= RNA_property_collection_length(&self->ptr, self->prop);
		Py_ssize_t start, stop, step, slicelength;

		if (PySlice_GetIndicesEx((PySliceObject*)key, len, &start, &stop,
&step, &slicelength) < 0)
			return NULL;

		if (slicelength <= 0) {
			return PyList_New(0);
		}
		else if (step == 1) {
			return existing_simple_slice(self, start, stop);
		}
		else {
			PyErr_SetString(PyExc_TypeError, "slice steps not supported");
			return NULL;
		}
	}

On Mon, Jul 6, 2009 at 2:28 PM, René Dudfield<renesd@xxxxxxxxx> wrote:
>
>
> On Tue, Jul 7, 2009 at 1:38 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
>>
>> Hi René,
>>
>> The test has been disabled for Python 3. For future reference the
>> python2_ignore and python3_ignore tags disable tests for Python 2.x and
>> Python 3.x respectively.
>>
>> Lenard
>
> cool, thanks.
>
>
>



-- 
- Campbell