[Python-Dev] __file__ and bytecode-only
Antoine Pitrou
solipsis at pitrou.net
Thu Mar 4 04:31:15 CET 2010
Le Wed, 3 Mar 2010 17:51:04 -0800,
Brett Cannon <brett at python.org> a écrit :
> 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.
Unless the .py files arrange to raise a syntax error on compiling.
More information about the Python-Dev
mailing list