On 11/4/06, Osvaldo Santana <[EMAIL PROTECTED]> wrote:
Hi,

I'm the author of this patch and we are already using it in Python
port for Maemo platform.

We are using .pyo modules mainly to remove docstrings from the
modules. We've discussed about this patch here[1] before.

Now, I agree that the zipimport behaviour is incorrect but I don't
have other option to remove docstrings of a .pyc file.

I'm planning to send a patch that adds a "--remove-docs" to the Python
interpreter to replace the "-OO" option that create only .pyo files.

[1] http://mail.python.org/pipermail/python-dev/2005-November/057959.html

The other option is to do away with .pyo files: http://www.python.org/dev/summary/2005-11-01_2005-11-15/#importing-pyc-and-pyo-files

Guido has said he wouldn't mind it, but then .pyc files need to grow a field or so to be able to store what optimizations were used.  While this would lead to more bytecode regeneration, it would help deal with this case and allow for more optimizations on the bytecode.

-Brett
 

On 11/4/06, "Martin v. Löwis" < [EMAIL PROTECTED]> wrote:
> Fredrik Lundh schrieb:
> >> However, I find the proposed behaviour reasonable: Python already
> >> automatically imports the .pyc file if .py is not given and vice
> >> versa. So why not look for .pyo if the .pyc file is not present?
> >
> > well, from a performance perspective, it would be nice if Python looked
> > for *fewer* things, not more things.
>
> That's true.
[cut]

--
Osvaldo Santana Neto (aCiDBaSe)
http://www.pythonologia.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/brett%40python.org

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to