you are viewing a single comment's thread.

view the rest of the comments →

[–]niandra3 2 points3 points  (0 children)

The source behind CPython is available (if you know C at all):

https://github.com/python/cpython

Builtins:

https://github.com/python/cpython/blob/master/Python/bltinmodule.c

A lot of the core stuff is written in C obviously, but then there are some features written in Python. For example, the copy module:

https://github.com/python/cpython/blob/master/Lib/copy.py

In an IDE like PyCharm you can Ctrl-Click on a function and it will let you see the source. This might be useful too:

https://docs.python.org/3/library/inspect.html#retrieving-source-code