<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Python list implementation</title>
	<atom:link href="http://www.laurentluce.com/posts/python-list-implementation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laurentluce.com/posts/python-list-implementation/</link>
	<description>Technical blog on web technologies</description>
	<lastBuildDate>Sat, 08 Jun 2013 15:02:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: dan</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-17606</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Mon, 23 Apr 2012 15:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-17606</guid>
		<description><![CDATA[tem: agreed.  I think the python wiki article can be misleading if you don&#039;t read carefully.  pop(0) becomes equivalent to remove, which is O(n) for a basic list.]]></description>
		<content:encoded><![CDATA[<p>tem: agreed.  I think the python wiki article can be misleading if you don&#8217;t read carefully.  pop(0) becomes equivalent to remove, which is O(n) for a basic list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-11936</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Wed, 15 Feb 2012 15:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-11936</guid>
		<description><![CDATA[Very interesting reading indeed, thanks a lot :-) I found an article about list comlexity, but these memory pictures are really helpful from the point of view of implementation]]></description>
		<content:encoded><![CDATA[<p>Very interesting reading indeed, thanks a lot <img src='http://www.laurentluce.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I found an article about list comlexity, but these memory pictures are really helpful from the point of view of implementation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Luce</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-6707</link>
		<dc:creator>Laurent Luce</dc:creator>
		<pubDate>Tue, 11 Oct 2011 05:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-6707</guid>
		<description><![CDATA[A list object contains a list of pointers to PyObjects. A PyObject contains a pointer to the corresponding type object. See object.h in the Python source code for more details.]]></description>
		<content:encoded><![CDATA[<p>A list object contains a list of pointers to PyObjects. A PyObject contains a pointer to the corresponding type object. See object.h in the Python source code for more details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-6073</link>
		<dc:creator>Ganesh</dc:creator>
		<pubDate>Sun, 11 Sep 2011 17:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-6073</guid>
		<description><![CDATA[Can you explain how is list implemented so as it can hold different datatypes.]]></description>
		<content:encoded><![CDATA[<p>Can you explain how is list implemented so as it can hold different datatypes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tem</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-3046</link>
		<dc:creator>tem</dc:creator>
		<pubDate>Mon, 14 Mar 2011 12:49:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-3046</guid>
		<description><![CDATA[L.pop([index]) -&gt; item -- remove and return item at index.

I&#039;m guessing pop is O(n) if you pop the first element.]]></description>
		<content:encoded><![CDATA[<p>L.pop([index]) -&gt; item &#8212; remove and return item at index.</p>
<p>I&#8217;m guessing pop is O(n) if you pop the first element.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Luce</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-3043</link>
		<dc:creator>Laurent Luce</dc:creator>
		<pubDate>Mon, 14 Mar 2011 00:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-3043</guid>
		<description><![CDATA[@Ivan: I updated the article with the following information. Append is O(1), Insert is O(n), Pop is O(1), Remove is O(n). Sort is O(n log n). You can see more of those &lt;a href=&quot;http://wiki.python.org/moin/TimeComplexity&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.

Appending n elements is O(n). For n = 1000, the list is going to be resized 27 times. The growth pattern is the following: 4, 8, 16, 25, 35, 46, 58, 72, 88, 106, 126, 148, 173, 201, 233, 269, 309, 354, 405, 462, 526, 598, 679, 771, 874, 990, 1120. This means 27 calls to realloc. It doesn&#039;t change the complexity. It is still O(n).]]></description>
		<content:encoded><![CDATA[<p>@Ivan: I updated the article with the following information. Append is O(1), Insert is O(n), Pop is O(1), Remove is O(n). Sort is O(n log n). You can see more of those <a href="http://wiki.python.org/moin/TimeComplexity" rel="nofollow">here</a>.</p>
<p>Appending n elements is O(n). For n = 1000, the list is going to be resized 27 times. The growth pattern is the following: 4, 8, 16, 25, 35, 46, 58, 72, 88, 106, 126, 148, 173, 201, 233, 269, 309, 354, 405, 462, 526, 598, 679, 771, 874, 990, 1120. This means 27 calls to realloc. It doesn&#8217;t change the complexity. It is still O(n).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-3019</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Sat, 12 Mar 2011 20:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-3019</guid>
		<description><![CDATA[Hi,


Could you give us an idea of the running time of these operations?

O(1) for append ?
O(n) for insert ?

And what would be the total running time to append 1000 elements to a [] taking into account operations wasted on growing the list?]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Could you give us an idea of the running time of these operations?</p>
<p>O(1) for append ?<br />
O(n) for insert ?</p>
<p>And what would be the total running time to append 1000 elements to a [] taking into account operations wasted on growing the list?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: klonuo</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-2936</link>
		<dc:creator>klonuo</dc:creator>
		<pubDate>Fri, 11 Mar 2011 11:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-2936</guid>
		<description><![CDATA[Very interesting article

I read it in my RSS reader as part of &quot;Planet Python&quot; feeds and was then &quot;forced&quot; to launch Firefox and see your blog :)

I hope for other interesting post in future

Cheers]]></description>
		<content:encoded><![CDATA[<p>Very interesting article</p>
<p>I read it in my RSS reader as part of &#8220;Planet Python&#8221; feeds and was then &#8220;forced&#8221; to launch Firefox and see your blog <img src='http://www.laurentluce.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I hope for other interesting post in future</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TechnoBits.net</title>
		<link>http://www.laurentluce.com/posts/python-list-implementation/comment-page-1/#comment-2924</link>
		<dc:creator>TechnoBits.net</dc:creator>
		<pubDate>Fri, 11 Mar 2011 05:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.laurentluce.com/?p=271#comment-2924</guid>
		<description><![CDATA[Very good article, uncovers the most used feature in python.]]></description>
		<content:encoded><![CDATA[<p>Very good article, uncovers the most used feature in python.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
