You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as was intended in PEP-3118. The documentation there says this functionality should:
"Copy len bytes of data pointed to by the contiguous chunk of memory pointed to by buf into the buffer exported by obj. Return 0 on success and return -1 and raise an error on failure. If the object does not have a writable buffer, then an error is raised. If fortran is 'F', then if the object is multi-dimensional, then the data will be copied into the array in Fortran-style (first dimension varies the fastest). If fortran is 'C', then the data will be copied into the array in C-style (last dimension varies the fastest). If fortran is 'A', then it does not matter and the copy will be made in whatever way is more efficient."
PEP-3118 was written 18 years ago and we've managed without this function for that long. I think we should add it only if there are clear use cases, not simply because it's in the PEP.
If you'd like this function implemented, could you provide examples of existing code (e.g., in existing C extensions) that would be made better by this function?
Uh oh!
There was an error while loading. Please reload this page.
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:
Linked PRs
PyObject_CopyToObject
inPEP3118
#124747The text was updated successfully, but these errors were encountered: