Where to use a pyc file

后端 未结 3 1126
灰色年华
灰色年华 2021-01-02 02:03

I want to know what a pyc file(python bytecode) is. I want to know all the details. I want to know about how pyc files interface with the compiler. Is it a replacement for e

3条回答
  •  抹茶落季
    2021-01-02 02:50

    Python bytecode requires Python to run, cannot be ran standalone without Python, and is specific to a particular x.y release of Python. It should be portable across platforms for the same version. There is not a common reason for you to use it; Python uses it to optimize out parsing of your .py file on repeated imports. Your life will be fine ignoring the existence of pyc files.

提交回复
热议问题