This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:48adminlinkissue400998 messages
2007-08-23 15:00:48admincreate