[issue29813] PyTuple_GetSlice does not always return a new tuple

Michael Seifert report at bugs.python.org
Wed Mar 15 22:53:00 EDT 2017


Michael Seifert added the comment:

I rather thought about something along the lines of: "Take a slice of the tuple pointed to by *p* from *low* to *high* and return it as a tuple. Whether the returned tuple is new or not is an implementation detail (and may depend on the value of the arguments)." Because from the point of the C-API tuples aren't immutable, at least not if they are new (refcount 1).

Thank you both for your feedback. I'll leave it closed as "not a bug", I got the point about over-explaining. :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29813>
_______________________________________


More information about the Python-bugs-list mailing list