The source code of selectmodule.c is here The source code of cpython is mirrored on Github, and the Python part of the standard library is under the Lib 文件夹下,用 C 编写的部分(也就是你说的 so 后缀的模块)在 Modules folder.
Happy hacking! ;-)
Supplement: The method of using Pycharm to view select.py downstairs is wrong. During the process of compiling CPython source code, selectmodule.c will be compiled into a select.pyd file (pyd files are similar in nature to dll files, please see the official documentation for specific differences), and the select.py file is just the entrance to the select.pyd file. , there is nothing inside. The real source code is the selectmodule.c file.
The source code of selectmodule.c is here
The source code of cpython is mirrored on Github, and the Python part of the standard library is under the
Lib
文件夹下,用 C 编写的部分(也就是你说的 so 后缀的模块)在Modules
folder.Happy hacking! ;-)
Supplement: The method of using Pycharm to view select.py downstairs is wrong. During the process of compiling CPython source code, selectmodule.c will be compiled into a select.pyd file (pyd files are similar in nature to dll files, please see the official documentation for specific differences), and the select.py file is just the entrance to the select.pyd file. , there is nothing inside. The real source code is the selectmodule.c file.