In order to make an educated decision, I especially need to take a look at how range is implemented in Python 3. How do I find this implementation?
I know I can use module.__file__ for modules, but which modules does built-in functions belong to, and where do I find the implementation?
Add a comment
|
1 Answer
You can always read the source code
5 Comments
jfs
I've changed the link to point to Python 3.3 source (instead of 2.7)
beruic
Thank you. That's exactly what I was looking for. Just couldn't find it in the source :)
Rancho
hello, I'm puzzled where to find the resource file of built-in module, like
time? almost standard lib I could find in /usr/lib/python3.x, except this onekarthikr
if you are using a mac, you can open the python interpreter using
python -v and then do import time. This would print out the location the module was imported from @ranchoRancho
thx, archlinux-python3.5, I got
import 'time' # <class '_frozen_importlib.BuiltinImporter'>, what does that mean, how can I see the implement of time module? @karthikr