[Import-SIG] PEP for the removal of PYO files

Brett Cannon brett at python.org
Sat Feb 28 22:16:30 CET 2015

On Sat, Feb 28, 2015 at 11:57 AM Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Fri, 27 Feb 2015 17:06:59 +0000
> Brett Cannon <bcannon at gmail.com> wrote:
> >
> > A period was chosen over a hyphen as a separator so as to distinguish
> > clearly that the optimization level is not part of the interpreter
> > version as specified by the cache tag. It also lends to the use of
> > the period in the file name to delineate semantically different
> > concepts.
> Indeed but why would other implementations have to mimick CPython here?
> Perhaps the whole idea of differing "optimization" levels doesn't make
> sense for them.

Directly it might not, but if they support the AST module along with
passing AST nodes to compile() then they would implicitly support
optimizations for bytecode through custom loaders.

I also checked PyPy and IronPython 3 and they both support -O.

But an implementation that chose to skip the ast module and not support -O
is the best argument to support Nick's ask to not specify the optimization
if it is 0 (although I'm not saying that's enough to sway me to change the
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20150228/6c791ce5/attachment-0001.html>

More information about the Import-SIG mailing list