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 <>
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,
        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.
Date User Action Args
2019-10-25 20:18:29terry.reedysetrecipients: + terry.reedy, docs@python, wim.glenn
2019-10-25 20:18:29terry.reedysetmessageid: <>
2019-10-25 20:18:29terry.reedylinkissue38557 messages
2019-10-25 20:18:29terry.reedycreate