Author terry.reedy
Recipients docs@python, terry.reedy, wim.glenn
Date 2019-10-25.20:18:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572034709.8.0.0233762928961.issue38557@roundup.psfhosted.org>
In-reply-to
Content
Verified from Python.
>>> t = (1,2,3)
>>> t2 = t[:]
>>> id(t), id(t2)
(1672756229504, 1672756229504)

A partial slice cannot the original tuple, so I presume that the emphasis is about returning a (new) *tuple*, rather than some sort of view of the original.  However,
        Py_INCREF(a);
        return (PyObject *)a;
date back to at least 1997 (GvR), so the optimization is not new.  I don't know what should replace 'New reference.'  'Old or new reverence.'?

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

could be replaces with

"Return the slice of the tuple point to by p for low to high.  If it is a proper subslice, return a new tuple."

This leave it undefined when a complete slice.
History
Date User Action Args
2019-10-25 20:18:29terry.reedysetrecipients: + terry.reedy, docs@python, wim.glenn
2019-10-25 20:18:29terry.reedysetmessageid: <1572034709.8.0.0233762928961.issue38557@roundup.psfhosted.org>
2019-10-25 20:18:29terry.reedylinkissue38557 messages
2019-10-25 20:18:29terry.reedycreate