Ben Finney wrote:
> Could we instead have a single subdirectory for each tree of module
> packages, keeping them tidily out of the way of the source files, while
> making them located just as deterministically::

Not easily. With the scheme currently proposed in the PEP, setting a
value for __file__ which is both reasonably accurate and backwards
compatible with existing file manipulation techniques is
straightforward: just use the name of the cache directory.

With a parallel tree, either __file__ will bear little relation to the
actual location of the cache files or it won't be backwards compatible
with existing usage.

Keep in mind that if this PEP becomes the norm, the level of readily
visible clutter will actually be reduced from ", foo.pyc, foo.pyo"
to just ", foo.pyr" (with the file/directory split making it even
easier to separate out the source file from the compiled cache files).


Nick Coghlan   |   |   Brisbane, Australia
Python-Dev mailing list

Reply via email to