[Python-ideas] disabling .pyc and .pyo files

Antoine Pitrou solipsis at pitrou.net
Thu Dec 10 04:48:54 CET 2009

Ben Finney <ben+python at ...> writes:
> Guido van Rossum <guido <at> python.org> writes:
> > Could it be as simple as this:
> >
> > -b don't read bytecode (new flag)
> > -B don't write bytecode (existing flag)
> Almost, but I think many in this discussion are agitating for “don't
> read orphaned bytecode” to become the default.

Either to become the default (which might require updates to things like
py2exe), or to have a dedicated flag.
On the other hand, a flag not to read bytecode /at all/ doesn't seem to have an
use case. If you don't want to read any bytecode, don't produce/install it in
the first place.
Bytecode is useful, it reduces startup times. It's only annoying when the
original .py file has been deleted and the obsolete .pyc/.pyo is dangling on



More information about the Python-ideas mailing list