Vitor Bosshard wrote:
2010/1/31 Georg Brandl <g.bra...@gmx.net>:
+1. It should be quite easy to assign a new name every time the magic
number is updated.
If we don't change the bytecode for a given Python version, then the
name of the bytecode format used wouldn't change either.
That would be the only remaining complaint for casual users. ("Why doesn't
Python compile my file for 2.8?")
I think it's preferable to have a redundant copy of the compiled file
floating around rather than creating confusion as to which one each
python interpreter uses.
Optimizing disk space (and marginal compile time) is not worth the
mental overhead this would introduce. Better keep it as clear and
simple as possible, i.e. create different .pyc files even if the
bytecode doesn't change between releases.
Additionally, it has been mentioned that the magic number might change
with different builds of alpha releases, but that shouldn't matter
because the existing .pyc files don't show the magic number anyway!
Python-Dev mailing list