New issue
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
PyBytes (buffer) .extend method needs to accept any iterable of ints #45624
Comments
Here a patch that adds support for any iterable (or sequence) of |
Made 2 minor enhancements to the patch: |
There is a reference leak in my previous patches. So, I updated (again) |
Here yet another revision of the patch. This one makes |
"There is still another possible leak if the PyMem_Realloc Do it. It looks easy: a Py_DECREF(it) before the return PyErr_NoMemory(). |
Done. Is there any other issue with the patch? |
reading 5.patch over... Any particular reason for using buf_size = 32 when the length isn't perhaps use a list comprehension instead of map() in the unit test? (int(x) for x in orig*50) [int(x) for x in orig*50] also the uses of 5 and -5 in that test could be written using add another assertRaises that tests to make sure a list with -1 in it While I dislike that this code makes a temporary copy of the data -gps On 12/2/07, Alexandre Vassalotti <report@bugs.python.org> wrote:
|
Thank you Gregory for the review! Committed to r59314. |
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: