简体   繁体   中英

Python 2 and 3, are the bytecode (pyo & pyc) backward compatible?

Python 2 and 3, are the bytecode (pyo & pyc) backward compatible?

can i execute python 2 pyo & pyc file with python 3?

No, they are usually not even compatible between minor releases (eg 2.6 vs 2.7).
However, since you usually have the .py files, too, python will automatically compile them for the currently used version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM