[Python-ideas] Changing the name of __pycache__

Antoine Pitrou solipsis at pitrou.net
Wed Feb 9 12:42:14 CET 2011


On Wed, 09 Feb 2011 12:16:28 +0100
"M.-A. Lemburg" <mal at egenix.com> wrote:
> Nick Coghlan wrote:
> > Raymond's suggestion is specifically addressed (and rejected) in PEP
> > 3147: http://www.python.org/dev/peps/pep-3147/#pyc
> > 
> > On Wed, Feb 9, 2011 at 7:07 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> >> I'm not sure why this was done. It looks like an unnecessary
> >> limitation of the PEP.
> > 
> > Because we wanted deleting the .py file to be the "one obvious way" to
> > remove a module, rather than allowing "ghost modules" to hang around
> > in __pycache__.
> 
> Isn't that a rather rare use case nowadays where packages and
> modules are usually installed as egg directories ?
> 
> You typically delete the whole egg dir to remove an installed
> module/package and don't really care what's inside the directory.

Nick was talking about deleting a single file. As a developer, not as
an administrator. Bizarre issues because of a dangling pyc file
after removing the py file are now the past, which is a good thing :)

Regards

Antoine.





More information about the Python-ideas mailing list