From 1f0411293c10ba2de142b345f640edf79e9c252b Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Wed, 22 Jul 2009 21:16:12 -0400 Subject: [PATCH] shift/unshift --- native-datatypes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native-datatypes.html b/native-datatypes.html index 62c5338..4ad5139 100755 --- a/native-datatypes.html +++ b/native-datatypes.html @@ -292,7 +292,7 @@ ZeroDivisionError: Fraction(0, 0)
-

a_list.insert(0, value) is like the shift() function in Perl. It adds an item to the beginning of the list, and all the other items have their positional index bumped up to make room. +

a_list.insert(0, value) is like the unshift() function in Perl. It adds an item to the beginning of the list, and all the other items have their positional index bumped up to make room.

Let’s look closer at the difference between append() and extend().