[Python-Dev] Python byte-compiled and optimized code

Terry Reedy tjreedy at udel.edu
Wed Oct 7 18:54:32 CEST 2009

Fred Drake wrote:
> On Wed, Oct 7, 2009 at 10:34 AM, Swapnil Talekar <swapnil.st at gmail.com> wrote:
>> 1) Is the byte-compiled .pyc file and optimized .pyo file
>> platform-independent?(including python versions 3.x)
> Yes.

To be clear, CPython's .pyc is platform independent for a particular x.y 
version, and should, I believe, stay the same for all x.y.z releases,
but the format of .pyc may change slightly from x.y to x.(y+1)

More information about the Python-Dev mailing list