
report at bugs
May 11, 2012, 10:41 AM
Post #50 of 56
(78 views)
Permalink
|
|
[issue13959] Re-implement parts of imp in pure Python
[In reply to]
|
|
Eric Snow <ericsnowcurrently [at] gmail> added the comment: Question on this one: <snip> @@ -126,7 +131,7 @@ def load_compiled(name, pathname, file=N # XXX deprecate def load_package(name, path): if os.path.isdir(path): - extensions = _bootstrap._SOURCE_SUFFIXES + [_bootstrap._BYTECODE_SUFFIX] + extensions = machinery.SOURCE_SUFFIXES[:] + [machinery.BYTECODE_SUFFIXES] for extension in extensions: path = os.path.join(path, '__init__'+extension) if os.path.exists(path): </snip> Should that be the following? extensions = machinery.SOURCE_SUFFIXES[:] + machinery.BYTECODE_SUFFIXES[:] Also, why the "[:]"? Finally, in a couple spots you use the first element of the list (like the old case of "machinery.SOURCE_SUFFIXES[0]" in source_from_cache() and the new one in find_module()). Will this be a problem where the source file has one of the other suffixes? I'm not sure it's a big enough deal for the moment to worry about, but thought I'd ask. :) ---------- _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue13959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|