We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2006-04-06.12:46:16.000> created_at = <Date 2006-04-05.03:38:23.000> labels = [] title = 'PyList_GetItem() clarification' updated_at = <Date 2006-04-06.12:46:16.000> user = 'https://github.com/stefanseefeld'
bugs.python.org fields:
activity = <Date 2006-04-06.12:46:16.000> actor = 'georg.brandl' assignee = 'none' closed = True closed_date = None closer = None components = ['None'] creation = <Date 2006-04-05.03:38:23.000> creator = 'stefan' dependencies = [] files = [] hgrepos = [] issue_num = 1464658 keywords = [] message_count = 3.0 messages = ['28090', '28091', '28092'] nosy_count = 3.0 nosy_names = ['georg.brandl', 'stefan', 'splitscreen'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue1464658' versions = []
The text was updated successfully, but these errors were encountered:
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.
I believe it would be worthwhile pointing out in the API docs that in fact a positive value is expected.
It would be good to change the function signature to expect an unsigned int instead of an int for the index.
Sorry, something went wrong.
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
Logged In: YES user_id=849994
Thanks! Fixed in rev. 43704, 43705.
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: