<p>因为“附加”早在“流行”之前就存在了。<a href="http://www.dalkescientific.com/writings/diary/archive/2009/03/27/python_0_9_1p1.html">Python 0.9.1</a>1991年初支持list.append。相比之下,这里是关于1997年添加pop的<a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/48a26add2d996268/57ab953cb73bc9c7?q=list+pop+group:comp.lang.python+author:guido#">discussion on comp.lang.python</a>部分内容。圭多写道:</p>
<blockquote>
<p>To implement a stack, one would need
to add a list.pop() primitive (and
no, I'm not against this particular
one on the basis of any principle).
list.push() could be added for
symmetry with list.pop() but I'm not
a big fan of multiple names for the
same operation -- sooner or later
you're going to read code that uses
the other one, so you need to learn
both, which is more cognitive load.</p>
</blockquote>
<p>您还可以看到,他讨论了push/pop/put/pull应该在元素[0]处还是在元素[-1]之后,在元素[1]处发布对图标列表的引用:</p>
<blockquote>
<p>I stil think that all this is best
left out of the list object
implementation -- if you need a stack,
or a queue, with particular
semantics, write a little class that
uses a lists</p>
</blockquote>
<p>换句话说,对于已经支持fast append()和del list[-1]的直接实现为Python list的堆栈,list.pop()在默认情况下对最后一个元素起作用是有意义的。即使其他语言做得不一样。</p>
<p>这里隐含的是,大多数人需要追加到列表中,但很少有人有机会将列表视为堆栈,这就是为什么list.append来得更早。</p>