[Python-ideas] Changing the name of __pycache__

Raymond Hettinger raymond.hettinger at gmail.com
Wed Feb 9 18:45:39 CET 2011


On Feb 9, 2011, at 9:30 AM, Antoine Pitrou wrote:

> On Wed, 09 Feb 2011 09:07:05 -0800
> Ethan Furman <ethan at stoneleaf.us> wrote:
>> +1 on ".pycache" as well.
> 
> Well, unless you propose postponing the forthcoming 3.2 release for
> that, it's probably too late anyway.

Yes, I propose that we do that now (3.2rc2).

It is a simple exercise with sed to change it
and not hard to get right.

We've gotten +1 on .pycache from:
   Mark Lemburg, Ethan Furman, David Malcolm, and me.

AFAICT, the only thing going for __pycache__ is that that
is was is already in the tree.  So far, no one has said they
prefer that name to .pycache.


> (and of course it's not "just a #define"; there are tests, and probably
> importlib and other modules relying on it; and the PEP to update too)
> 
> That said, I think it is useful that casual users of Python are aware
> that Python does cache bytecode files. It's not a complex enough notion
> that there's any point in hiding these from them. After all, explicit
> is better than implicit.

The dot-file naming convention is pretty well established.
People use "ls" much more than they use "ls -a" because
they usually don't want to see those files or directories.

IOW, implicit is better when we're talking about system files
and caching and whatnot.


Raymond




More information about the Python-ideas mailing list