← 输入框|bugs.python.org|刷新

➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 terry.reedy
收信人 docs@python, terry.reedy, wim.glenn
日期 2019-10-25.20:18:29
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1572034709.8.0.0233762928961.issue38557@roundup.psfhosted.org>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2019-10-25 20:18:29terry.reedy修改recipients: + terry.reedy, docs@python, wim.glenn
2019-10-25 20:18:29terry.reedy修改messageid: <1572034709.8.0.0233762928961.issue38557@roundup.psfhosted.org>
2019-10-25 20:18:29terry.reedy链接issue38557 messages
2019-10-25 20:18:29terry.reedy创建