Hah. .pyc files are one of the worst part of Python for developers.
export PYTHONDONTWRITEBYTECODE=true is the first thing anyone should be doing.
I guess it figures that we copy each others' mistakes.
export PYTHONDONTWRITEBYTECODE=true is the first thing anyone should be doing.
I guess it figures that we copy each others' mistakes.
The overhead is tiny, less than milliseconds for sane modules. It's a useless optimization, especially when it can be done at install time only, say, as opposed to for every module import, but even that is somewhat silly.
Not sure about the exact conditions when this occurs, but it's definitely happened to me when code is refactored and you pull the newest version in with git.