Nick Coghlan added the comment:

(With the draft docs now comitted, this issue is the home for thrashing out the 
terminology. I'm not going to propose taking this to import-sig or python-dev, 
because the bikeshed would end up being fuschia or pink-with-yellow-polkadots 
or something)

However this turns out, the names in the glossary and the ABCs in importlib 
should match for 3.3b2. I wouldn't bother with programmatic deprecation here 
(it's a PITA), just note them as deprecated aliases in the docs.

However, I also think we need to take into account the naming precedents 
established (or endorsed) by importlib and think carefully about whether which 
ones we want to change.

1. importlib currently uses "importer" to mean an object that is both a finder 
*and* a loader (hence BuiltinImporter, FrozenImporter as meta path hooks). This 
is the original meaning of the term as defined in PEP 302

2. importlib uses the "PathFinder" term for what Barry has proposed to call the 
"path importer". If we go with this change in terminology, then we should 
change the general term "meta path finders" to "meta path importers", as that 
would make the usage of the term "importer" consistent across the three default 
meta path hooks. There would no longer be a special term to denote an importer 
that returned itself as the module loader. However, I'm now -1 on making this 
change: I'd prefer to preserve the distinction that an importer is a finder 
that returns itself as the loader, which means the path finder doesn't qualify.

3. I still find it confusing to have two different kinds of "finder". If the 
meta path finders keep their name (as I now prefer), then it is the path entry 
finders that need to move. While "handler" is a ridiculously generic term, the 
chain "path finder"->"path hook"->"path entry handler"->"module loader" strikes 
me as being easier to follow than "path finder"->"path hook"->"path entry 
finder"->"module loader". The only name change required for this adjustment in 
terminology would be that importlib.FileFinder would become 
importlib.DirectoryHandler

4. There would be a slight tweak to the definition of "importer" to mean 
objects that are either a meta path finder and module loader (i.e. 
BuiltinImporter, FrozenImporter) or else a path entry handler and module loader 
(i.e. zipimport.zipimporter)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15502>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to