Re: [Python-Dev] PySlice_GetIndicesEx annd stable ABI: bikeshedding

2016-12-26 Thread Serhiy Storchaka
On 21.12.16 19:34, Brett Cannon wrote: On Wed, 21 Dec 2016 at 06:52 Serhiy Storchaka > wrote: [SNIP] Let's start bikeshedding. What are your ideas about names and the order of arguments of two following functions? 1. Takes a

Re: [Python-Dev] PySlice_GetIndicesEx annd stable ABI: bikeshedding

2016-12-22 Thread Serhiy Storchaka
On 22.12.16 12:16, Armin Rigo wrote: On 21 December 2016 at 15:51, Serhiy Storchaka wrote: The code if (PySlice_GetIndicesEx(item, length, , , , ) < 0) return -1; should be replaced with if (foo(item, , , ) < 0) return -1;

Re: [Python-Dev] PySlice_GetIndicesEx annd stable ABI: bikeshedding

2016-12-22 Thread Armin Rigo
Hi Serhiy, On 21 December 2016 at 15:51, Serhiy Storchaka wrote: > The code > > if (PySlice_GetIndicesEx(item, length, > , , , ) < 0) > return -1; > > should be replaced with > > if (foo(item, , , ) < 0) > return -1; > slicelength =

Re: [Python-Dev] PySlice_GetIndicesEx annd stable ABI: bikeshedding

2016-12-21 Thread Brett Cannon
On Wed, 21 Dec 2016 at 06:52 Serhiy Storchaka wrote: > [SNIP] > Let's start bikeshedding. What are your ideas about names and the order > of arguments of two following functions? > > 1. Takes a slice object, returns it's start, stop and step as Py_ssize_t > values. Can fail.

[Python-Dev] PySlice_GetIndicesEx annd stable ABI: bikeshedding

2016-12-21 Thread Serhiy Storchaka
Three months ago we discussed about an issue with PySlice_GetIndicesEx(). (https://mail.python.org/pipermail/python-dev/2016-August/145901.html) The problem was that PySlice_GetIndicesEx() takes the size of the sequence, but the size of the sequence can be changed when call custom __index__()