[Python-ideas] Changing the name of __pycache__

Alexandre Conrad alexandre.conrad at gmail.com
Wed Feb 9 21:56:40 CET 2011


2011/2/9 Steven D'Aprano <steve at pearwood.info>:
> Raymond Hettinger wrote:
>
>> If a consensus were to emerge, it would still be possible to change the
>> name from "__pycache__" to ".pycache".
>
> -1.
>
> Please don't encourage the Unix anti-pattern of scattering invisible
> breadcrumbs all throughout your work-area.
>
> Besides, unless I'm misinformed, such dot files aren't invisible in Windows
> systems (or Mac?), so the fundamental assumption that changing the name will
> make it invisible will be wrong for many, perhaps most, users.

Yes, I did think about that afterwards.

> I don't particularly like the name __pycache__ but it does match the Python
> convention of using double-underscore names. Otherwise, it risks clashing
> with a user's own directory. I *far* prefer it over .pycache.

"dunder" naming is a Python convention and is OK for Python code. Even
though I am not a big fan of the __init__.py file, at least the user
created it for his python package to be seen. Whereas __pycache__
conveys the idea that it is has a special meaning (such as
__init__.py) and suggests it may alter your application's behavior,
which does not.

Just nitpicking, I guess. So I remove my +1 for the ".pycache" idea
(for the reason that being hidden is platform specific) and my call is
now +0.

-- 
Alex | twitter.com/alexconrad



More information about the Python-ideas mailing list