Author wim.glenn
Recipients docs@python, wim.glenn
Date 2019-10-22.15:51:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

In the c-api it says (emphasis mine):

    PyObject* PyTuple_GetSlice(PyObject *p, Py_ssize_t low, Py_ssize_t high)ΒΆ
    Return value: New reference.

    Take a slice of the tuple pointed to by p from low to high and return it **as a new tuple**.

But when slicing the entire tuple, CPython will return already existing instance, not a new tuple.

I propose the language in the docs be loosened so as not to tie the hands of implementation
Date User Action Args
2019-10-22 15:51:00wim.glennsetrecipients: + wim.glenn, docs@python
2019-10-22 15:51:00wim.glennsetmessageid: <>
2019-10-22 15:51:00wim.glennlinkissue38557 messages
2019-10-22 15:51:00wim.glenncreate