[Python-ideas] add a hash to .pyc to don't mess between .py and .pyc
Xavier Combelle
xavier.combelle at gmail.com
Sun Aug 14 22:55:03 EDT 2016
On 15/08/2016 02:49, Steven D'Aprano wrote:
> On Mon, Aug 15, 2016 at 01:05:47AM +0200, Xavier Combelle wrote:
>> I have stumbled upon several time with the following problem.
>> I delete a module and the .pyc stay around. and by "magic", python still
>> use the .pyc
> Upgrade to Python 3.2 or better, and the problem will go away.
>
> In 3.2 and above, the .pyc files are stored in a separate __pycache__
> directory, and are only used if the .py file still exists.
>
Sorry all about the noise, I knew the existence of __pycache__ for the
python version but I totally missed
that it solved also the problem the stalled .pyc too.
More information about the Python-ideas
mailing list