PEP 3147 - new .pyc format

John Bokma john at
Sun Jan 31 16:06:18 CET 2010

Steven D'Aprano <steve at> writes:

> On Sun, 31 Jan 2010 04:44:18 +0100, Alf P. Steinbach wrote:
>>> The relationship between byte code magic number and release version
>>> number is not one-to-one. We could have, for the sake of the argument,
>>> releases 3.2.3 through 3.5.0 (say) all having the same byte codes. What
>>> version number should the .pyc file show?
>> I don't know enough about Python yet to comment on your question, but,
>> just an idea: how about a human readable filename /with/ some bytecode
>> version id (that added id could be the magic number)?
> Sorry, that still doesn't work. Consider the hypothetical given above. 
> For simplicity, I'm going to drop the micro point versions, so let's say 
> that releases 3.2 through 3.5 all use the same byte-code. (In reality, 

Based on the magic numbers I've seen so far it looks like that not an
option. They increment with every minor change. So to me, at this moment
(and maybe it's my ignorance) it looks like a made up example to justify
what to me still looks like a bad decision.

John Bokma                                                               j3b

Hacking & Hiking in Mexico - - Perl & Python Development

More information about the Python-list mailing list