[Python-bugs-list] [ python-Bugs-739313 ] array.insert and negative indices
SourceForge.net
noreply@sourceforge.net
Sat, 17 May 2003 19:00:13 -0700
Bugs item #739313, was opened at 2003-05-18 03:29
Message generated for change (Comment added) made by doerwalter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=739313&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
Assigned to: Nobody/Anonymous (nobody)
Summary: array.insert and negative indices
Initial Comment:
2.3b1 changed list.insert() so that negative indices
are treated as being relative to the end of the list,
but array.array.insert() still treats all negative
indices as 0:
>>> import array
>>> a = array.array("c", "spam")
>>> a.insert(-1, "x")
>>> a
array('c', 'xspam')
----------------------------------------------------------------------
>Comment By: Walter Dörwald (doerwalter)
Date: 2003-05-18 04:00
Message:
Logged In: YES
user_id=89016
OK, I'll add tests/docs/NEWS
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2003-05-18 03:48
Message:
Logged In: YES
user_id=31435
Good point! I've attached the right patch. If someone else
can make time to write a test/docs/NEWS, I'd appreciate it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=739313&group_id=5470