Martin Matusiak added the comment:

- If you wish to make changes that affect the output of bytecode without having 
to update the magic number each time (while testing your changes) you can just 
delete your old .py(c|o) files! Even though you will end up changing the magic 
number if you change the bytecode, while you are debugging your work you will 
be changing the bytecode output without constantly bumping up the magic number. 
This means you end up with stale .pyc files that will not be recreated. Running 
find . -name '*.py[co]' -exec rm -f {} ';' should delete all .pyc files you 
have, forcing new ones to be created and thus allow you test out your new 
bytecode properly.

I propose: 
Any time you make changes that affect the output of bytecode you will need to 
update the magic number as well, otherwise Python will reuse your old .pyc 
files and you will not be able to test your new bytecode properly. If you do 
not wish to constantly bump the magic number you can just delete the old .pyc 
files each time by running find . -name '*.py[co]' -exec rm -f {} ';'

----------
Added file: http://bugs.python.org/file32250/wording_compiler4.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19316>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to