python package `from _collections import deque, defaultdict`
某草草
某草草 2017-05-18 10:49:24
0
3
756

I saw this line of code by chance yesterday
from _collections import deque

I was looking at the python library documentation. When I saw collections, I went to find the source code of deque.
Then I looked for _collections, but it was not found in the Lib directory. Use the search file When I found the directory
Lib/site-packages/requests/packages/urllib3/_collections.py, but there was no code about deque in it, so I was curiousfrom _collections import deque, where did this _collections come from

某草草
某草草

reply all (3)
左手右手慢动作

here

https://github.com/python/cpy...

    过去多啦不再A梦

    Built-in module, similar to c extension

    In [4]: import _collections

    In [5]: _collections
    Out[5]:

      伊谢尔伦

      _collections是一个内置模块, 要从源码查找:Python-2.7.12/Modules/_collectionsmodule.c

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!