diff --git a/compiler.rst b/compiler.rst --- a/compiler.rst +++ b/compiler.rst @@ -389,16 +389,11 @@ But you will also need to change the 'compiler' package. The key files to do that are Lib/compiler/pyassem.py and Lib/compiler/pycodegen.py . -If you make a change here that can affect the output of bytecode that -is already in existence and you do not change the magic number constantly, make -sure to 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. +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 {} ';'``. Code Objects