| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
@serhiy-storchaka: I addressed your comments. Please review the updated PR. |
Sorry, something went wrong.
|
|
||
| tup = () | ||
| copy = tuple_fromarray(tup) | ||
| self.assertIs(copy, tup) |
There was a problem hiding this comment.
Is not the empty tuple singleton a CPython implementation detail?
Sorry, something went wrong.
There was a problem hiding this comment.
The whole file is a CPython implementation detail (_testcapi), no?
Sorry, something went wrong.
Use also UNINITIALIZED_SIZE in test code.
|
I updated the PR for the latest review. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. 👍
Sorry, something went wrong.
| Create a tuple of *size* items and copy references from *array* to the new | ||
| tuple. |
There was a problem hiding this comment.
I would prefer to formulate this in words more similar to PyTuple_New() or PyTuple_Pack() ("Return a new tuple object of size ... "), but this is not so important.
Sorry, something went wrong.
|
Implementation looks good, thanks! Do you want to open a WG vote for this? |
Sorry, something went wrong.
I created capi-workgroup/decisions#79. |
Sorry, something went wrong.
|
I exchanged array and size parameters, new API: PyObject* PyTuple_FromArray(Py_ssize_t size, PyObject *const *array) |
Sorry, something went wrong.
Sorry, I changed my preference back to (array, size) as before :-) See the API discussion at: capi-workgroup/decisions#79 |
Sorry, something went wrong.
The C API Working Group accepted this API. |
Sorry, something went wrong.
|
Merged. Thanks for your review @serhiy-storchaka and @encukou! |
Sorry, something went wrong.
|
I added the function to pythoncapi-compat: python/pythoncapi-compat@89e023e |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--139691.org.readthedocs.build/