What is the use of Python's basic optimizations mode? (python -O)

后端 未结 7 685
终归单人心
终归单人心 2020-12-25 10:24

Python has a flag -O that you can execute the interpreter with. The option will generate \"optimized\" bytecode (written to .pyo files), and given twice, it wil

7条回答
  •  时光说笑
    2020-12-25 10:43

    I imagine that the heaviest users of -O are py2exe py2app and similar.

    I've personally never found a use for -O directly.

提交回复
热议问题