- Secret Recipes of the Python Ninja
- Cody Jackson
- 125字
- 2021-06-25 22:14:43
How it works...
When source code (.py) is read by the Python interpreter, the bytecode is generated and stored in __pycache__ as <module_name>.<version>.pyc. The .pyc extension indicates that it is compiled Python code. This naming convention is what allows different versions of Python code to exist simultaneously on the system.
When source code is modified, Python will automatically check the date with the compiled version in cache and, if it's out of date, will automatically recompile the bytecode. However, a module that is loaded directly from the command line will not be stored in __pycache__ and is recompiled every time. In addition, if there is no source module, the cache can't be checked, that is, a bytecode-only package won't have a cache associated with it.
- Unreal Engine Physics Essentials
- 微服務(wù)與事件驅(qū)動架構(gòu)
- Power Up Your PowToon Studio Project
- 算法大爆炸:面試通關(guān)步步為營
- Oracle數(shù)據(jù)庫從入門到運(yùn)維實(shí)戰(zhàn)
- Java虛擬機(jī)字節(jié)碼:從入門到實(shí)戰(zhàn)
- Bootstrap 4:Responsive Web Design
- Java編程技術(shù)與項(xiàng)目實(shí)戰(zhàn)(第2版)
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- 數(shù)據(jù)科學(xué)中的實(shí)用統(tǒng)計(jì)學(xué)(第2版)
- 深入大型數(shù)據(jù)集:并行與分布化Python代碼
- C語言王者歸來
- Hands-On GUI Application Development in Go
- 零基礎(chǔ)輕松學(xué)Java