Commit 410cb6be authored by Neil Schemenauer's avatar Neil Schemenauer

The _PyTuple_Resize() last_is_sticky flag must now always be false.

parent 08b53e6a
...@@ -3070,12 +3070,12 @@ Can be used to resize a tuple. \var{newsize} will be the new length ...@@ -3070,12 +3070,12 @@ Can be used to resize a tuple. \var{newsize} will be the new length
of the tuple. Because tuples are \emph{supposed} to be immutable, of the tuple. Because tuples are \emph{supposed} to be immutable,
this should only be used if there is only one reference to the object. this should only be used if there is only one reference to the object.
Do \emph{not} use this if the tuple may already be known to some other Do \emph{not} use this if the tuple may already be known to some other
part of the code. \var{last_is_sticky} is a flag --- if true, the part of the code. The tuple will always grow or shrink at the end. The
tuple will grow or shrink at the front, otherwise it will grow or \var{last_is_sticky} flag is not used and should always be false. Think
shrink at the end. Think of this as destroying the old tuple and of this as destroying the old tuple and creating a new one, only more
creating a new one, only more efficiently. Returns \code{0} on efficiently. Returns \code{0} on success and \code{-1} on failure (in
success and \code{-1} on failure (in which case a which case a \exception{MemoryError} or \exception{SystemError} will be
\exception{MemoryError} or \exception{SystemError} will be raised). raised).
\end{cfuncdesc} \end{cfuncdesc}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment