finding _collections in python source
Question: I wanted to have a look at the python deque class. When I checked [the source
code](http://hg.python.org/cpython/file/791034a0ae1e/Lib/collections/__init__.py)
, I found the following at line 10

    
    
     from _collections import deque, defaultdict
    

where exactly can I find this _collections module? I searched on my copy of
the python source, but couldn't spot it.

Where is this class located?


Answer: `_collections` is builtin extension module.

You can find source for _collection module
[here](http://hg.python.org/cpython/file/tip/Modules/_collectionsmodule.c).

[Setup.dist](http://hg.python.org/cpython/file/tip/Modules/Setup.dist)
contains mapping between builtin extension module name to source file.

