Where can I find the source for type list?
Where can I find the source for Python's list
type? I've had a quick look in its SVN repo (2.7 branch) but it's a very sca开发者_运维知识库ry place.
Edit: Since Python migrated from SVN a while back, to be more contemporary I'll link to its HG repo (2.7 branch) as well.
You can find that code in Objects/listobject.c.
Beware though, it can be scarier than the repo tree :)
Don't use the svn repository. Use the Mercurial repository, it's much easier to use. (It's also written in Python!) I've had UnicodeDecodeError
s and such viewing the svn repo, too.
list
is in listobject.c
精彩评论