On Wed, Jun 13, 2012 at 01:58:10PM -0400, R. David Murray wrote:

> So, is there any reason to not use the .pyo file (if that's all that is
> around) when -O is not specified?

.pyo and .pyc files have potentially different semantics. Right now, 
.pyo files don't include asserts, so that's one difference right there. 
In the future there may be more aggressive optimizations.

Good practice is to never write an assert that actually changes the 
semantics of your program, but in practice people don't write asserts 
correctly, e.g. they use them for checking user-input or function 
parameters.

So, no, we should never use .pyo files unless explicitly told to do so, 
since doing so risks breaking poorly-written but otherwise working code.



-- 
Steven
_______________________________________________
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