<br><br><div><span class="gmail_quote">On 11/4/06, <b class="gmail_sendername">Osvaldo Santana</b> &lt;<a href="mailto:osantana@gmail.com">osantana@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I'm the author of this patch and we are already using it in Python<br>port for Maemo platform.<br><br>We are using .pyo modules mainly to remove docstrings from the<br>modules. We've discussed about this patch here[1] before.
<br><br>Now, I agree that the zipimport behaviour is incorrect but I don't<br>have other option to remove docstrings of a .pyc file.<br><br>I'm planning to send a patch that adds a &quot;--remove-docs&quot; to the Python<br>
interpreter to replace the &quot;-OO&quot; option that create only .pyo files.<br><br>[1] <a href="http://mail.python.org/pipermail/python-dev/2005-November/057959.html">http://mail.python.org/pipermail/python-dev/2005-November/057959.html
</a></blockquote><div><br>The other option is to do away with .pyo files: <a href="http://www.python.org/dev/summary/2005-11-01_2005-11-15/#importing-pyc-and-pyo-files">http://www.python.org/dev/summary/2005-11-01_2005-11-15/#importing-pyc-and-pyo-files
</a><br><br>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.&nbsp; While this would lead to more bytecode regeneration, it would help deal with this case and allow for more optimizations on the bytecode.
<br><br>-Brett<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 11/4/06, &quot;Martin v. Löwis&quot; &lt;<a href="mailto:martin@v.loewis.de">
martin@v.loewis.de</a>&gt; wrote:<br>&gt; Fredrik Lundh schrieb:<br>&gt; &gt;&gt; However, I find the proposed behaviour reasonable: Python already<br>&gt; &gt;&gt; automatically imports the .pyc file if .py is not given and vice
<br>&gt; &gt;&gt; versa. So why not look for .pyo if the .pyc file is not present?<br>&gt; &gt;<br>&gt; &gt; well, from a performance perspective, it would be nice if Python looked<br>&gt; &gt; for *fewer* things, not more things.
<br>&gt;<br>&gt; That's true.<br>[cut]<br><br>--<br>Osvaldo Santana Neto (aCiDBaSe)<br><a href="http://www.pythonologia.org">http://www.pythonologia.org</a><br>_______________________________________________<br>Python-Dev mailing list
<br><a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/brett%40python.org">
http://mail.python.org/mailman/options/python-dev/brett%40python.org</a><br></blockquote></div><br>