mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fix array.array.insert(), so that it treats negative indices as
being relative to the end of the array, just like list.insert() does. This closes SF bug #739313.
This commit is contained in:
parent
df0d87a922
commit
9e46abed50
4 changed files with 34 additions and 3 deletions
|
|
@ -145,7 +145,8 @@ the first occurence of \var{x} in the array.
|
|||
|
||||
\begin{methoddesc}[array]{insert}{i, x}
|
||||
Insert a new item with value \var{x} in the array before position
|
||||
\var{i}.
|
||||
\var{i}. Negative values are treated as being relative to the end
|
||||
of the array.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[array]{pop}{\optional{i}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue