PEP 3147 - new .pyc format

John Bokma john at castleamber.com
Sat Jan 30 19:51:31 EST 2010


MRAB <python at mrabarnett.plus.com> writes:

> Alf P. Steinbach wrote:
>> * John Bokma:
>>> MRAB <python at mrabarnett.plus.com> writes:
>>>
>>>> The PEP has a .pyr directory for each .py file:
>>>>
>>>>     foo.py
>>>>     foo.pyr/
>>>>         f2b30a0d.pyc # Python 2.5
>>>>         f2d10a0d.pyc # Python 2.6
>>>>         f2d10a0d.pyo # Python 2.6 -O
>>>>         f2d20a0d.pyc # Python 2.6 -U
>>>>         0c4f0a0d.pyc # Python 3.1
>>>
>>> wow: so much for human readable file names :-(
>>
>> I agree.
>>
>> Human readable filenames would be much better.
>>
> The names are the magic numbers. It's all in the PEP.

Naming files using magic numbers is really beyond me. The fact that the
above needs comments to explain what's what already shows to me that
there's a problem with this naming scheme. What if for one reason or
another I want to delete all pyc files for Python 2.5? Where do I look
up the magic number?

-- 
John Bokma                                                               j3b

Hacking & Hiking in Mexico -  http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development



More information about the Python-list mailing list