[Python-ideas] Changing the name of __pycache__
mal at egenix.com
Wed Feb 9 12:16:28 CET 2011
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.
> Sourceless imports use the legacy .pyc location to
> distinguish them as a deliberate distribution choice over the "mere"
> caching in __pycache__. (Note that the original version of PEP 3147
> didn't support sourceless distribution at all).
Ok, but why don't those pyc files support the same <magic> add-on
as the files in the __pycache__ dir ?
Professional Python Services directly from the Source (#1, Feb 09 2011)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the Python-ideas