Vitor Bosshard wrote:
> Why not:
> 
> foo.py
> foo.pyc # < 2.7 or < 3.2
> foo.27.pyc
> foo.32.pyc
> etc.
> 
> 
> This is simpler and more logical than the current subfolder proposal,
> as it is clear which version each file corresponds to. Python can use
> all the magic values it wants, but please don't spill them over into
> the filesystem. Readability counts.

There is no one-to-one correspondence between Python version and pyc
magic numbers. Different runtime options may change the magic number and
different versions may reuse a magic number

> Putting the files into a separate dir also makes it much harder to
> work with external tools; e.g. VCSes already ignore .pyc and .pyo
> files, but not unknown directories.
> 
> I'd rather have a folder cluttered with files I know I can ignore (and
> can easily run a selective rm over) than one that is cluttered with
> subfolders.

It won't be cluttered with subfolders - you will have at most one .pyr
per source .py file. Even more conveniently, many file browsers already
list subfolders and files separately, so if you never run a version of
Python that uses the old .pyc format you won't even get that level of
clutter.

That is significantly better than accumulating an unbounded number of
different .pyc files interspersed amongst the actual source files I care
about.

The PEP gets a +1 from me.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to