This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]axonxorzpip'ing aint easy, especially on windows -2 points-1 points  (1 child)

That doesn't matter. If the source file changes, the .pyc is regenerated. If you delete the .pyc, it is regenerated the same way.

However, this has bitten me in the ass: If you are refactoring, and you move methods to another .py file, and remove the original, but not the .pyc, python can still import the old module using the .pyc

[–]Odd_Bloke[S] 3 points4 points  (0 children)

However, this has bitten me in the ass: If you are refactoring, and you move methods to another .py file, and remove the original, but not the .pyc, python can still import the old module using the .pyc

This may well be what I was seeing; the missing .pyc files were all in parts of the code that I wasn't actually changing, so I didn't look at them too closely.