Message33573
| Author |
gvanrossum |
| Recipients |
| Date |
2002年06月07日.14:19:05 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
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! :-) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:00:48 | admin | link | issue400998 messages |
| 2007年08月23日 15:00:48 | admin | create |
|