[ python-Bugs-1464658 ] PyList_GetItem() clarification
SourceForge.net
noreply at sourceforge.net
Wed Apr 5 13:59:22 CEST 2006
Bugs item #1464658, was opened at 2006-04-05 03:38
Message generated for change (Comment added) made by splitscreen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1464658&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Stefan Seefeld (stefan)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyList_GetItem() clarification
Initial Comment:
The PyList_GetItem function is documented at
http://docs.python.org/api/listObjects.html
as returning "...the object at position pos...".
However, even though in python -1 is a valid index,
this function expects a 'real' index.
1) I believe it would be worthwhile pointing out in
the API docs that in fact a positive value is
expected.
2) It would be good to change the function signature
to expect an unsigned int instead of an int for
the index.
----------------------------------------------------------------------
Comment By: Matt Fleming (splitscreen)
Date: 2006-04-05 11:59
Message:
Logged In: YES
user_id=1126061
I agree with these suggestions. It's not impossible for
someone to 'just assume' a negative index is handled
correctly by PyList_GetItem().
+1
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1464658&group_id=5470
More information about the Python-bugs-list
mailing list