
Guido van Rossum wrote:
On Wed, Dec 9, 2009 at 10:56 AM, Brett Cannon <brett@python.org> wrote:
On Wed, Dec 9, 2009 at 02:22, Nick Coghlan <ncoghlan@gmail.com> wrote:
Right, that's what I thought. I was only looking for a way to say “only use a bytecode file if the corresponding source code file exists”, and then trying to define “corresponding source code file”. As Guido said, the check goes the other way: the interpreter looks for
Ben Finney wrote: source files first, and if it doesn't find one, only then does it look for orphaned bytecode files (pyo/pyc).
Just a data point: I reversed that order in importlib to match mental semantics.
IIRC zipimport also reverses the order.
Hmm, not as orthogonal as I thought then :P I guess it is a credit to the PEP 302 API that I've never needed to care that zipimport might have the check the other way around :) Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------