Message33573
Logged In: YES
user_id=6380
> This patch changes the behaviour of PySlice_GetIndices,
> which must count as a public API function (albeit a pretty
> useless one as it is now). Is that OK? Or would it be
> better to have a new function PySlice_GetIndicesEx or
> something. Should check whether NumPy uses this function.
The big change is that it now can set an exception. I think
that's too big a change without changing the name.
PySlice_GetIndicesEx is fine.
You can call PyInt_AsLong on any object, and if it has a
tp_int or __int__ it will do the right thing, so it's better
not to call PyInt_Check or PyLong_Check.
The check for *step==0 could come earlier.
> Do you really want assignments to extended slices in
lists?
> They were never that inuitive to me.
They're about as useful as getting an extended slice from a
list, so I'd say yes. They're soooooo cute! :-) |
|
Date |
User |
Action |
Args |
2007-08-23 15:00:48 | admin | link | issue400998 messages |
2007-08-23 15:00:48 | admin | create | |
|