[Python-Dev] __file__ and bytecode-only

Brett Cannon brett at python.org
Thu Mar 4 02:51:04 CET 2010


On Wed, Mar 3, 2010 at 16:37, Jim Jewett <jimjjewett at gmail.com> wrote:

> I understand the need to ship without source -- but why does that
> require supporting .pyc (or .pyo) -only?
>
> Couldn't vendors just replace the real .py files with empty files?
>

Because if someone screws up the mod time on the source files the .pyc files
will get recreated silently.

-Brett




>
> Then no one would need the extra stat call, and no one would be bitten
> by orphaned .pyc files after a rename.
>
> [Yes, zips could still allow unmatched names; yes, it would be helpful
> if a tool were available to sync the last-modification time; yes a
> deprecation release should still be needed.]
>
> -jJ
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/brett%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100303/38201107/attachment-0001.html>


More information about the Python-Dev mailing list