[Python-Dev] Importing .pyc in -O mode and vice versa

Fredrik Lundh fredrik at pythonware.com
Sat Nov 4 17:52:09 CET 2006


Martin v. Löwis wrote:
> 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.
(wouldn't transparent import of PYO files mean that you end up with a 
program where some assertions apply, and others don't? could be con- 
fusing...)
</F>


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /