Is it possible to view the source code of Python's functions like sum, zip and the like? I just want to know about the implementation.
Thanks.
You can download it here:
Source for builtins functions (like sum, zip, etc) are in http://hg.python.org/cpython/file/57c157be847f/Python/bltinmodule.c.
You cant see the code for the sum and zip because those are wrapper of c functions. But other module you can check on http://hg.python.org/cpython/file/2.7/Lib
This will give you the location of the Python source code files on disk:
import sys
print(["%s %s" % (k,v) for k,v in sys,modules.items()] if k == "re")
On Windows, it is usually found on C:\python33\lib\. and on Linux it is /usr/python2.7/lib/....
Once there, you can view the .py files as you wish.