Where are math.py and sys.py?

前端 未结 4 928
孤独总比滥情好
孤独总比滥情好 2020-12-31 07:47

I found all the other modules in Python33/Lib, but I can\'t find these. I\'m sure there are others \"missing\" too, but these are the only ones I\'ve noticed. They work just

4条回答
  •  清歌不尽
    2020-12-31 08:09

    The modules like math, time, gc are not written in python and as rightly said in above answers that they are somewhere (written or moduled) within python interpreter. If you import sys and then use sys.builtin_module_names (it gives tuple of module names built into this interpreter). math is one such module in this list. So, we can see that math comes from here and is not separately written in library or any other folder as a python code.

提交回复
热议问题