Kaydet (Commit) c8c60652 authored tarafından Guido van Rossum's avatar Guido van Rossum

When looking for an alias, first look for the normalized name (which

still may contain dots), then if that doesn't exist look for the name
with dots replaced by underscores.  This is a little more forgiving.
üst bfcdb873
......@@ -69,7 +69,9 @@ def search_function(encoding):
globals(), locals(), _import_tail)
except ImportError:
import aliases
modname = aliases.aliases.get(modname, modname)
modname = (aliases.aliases.get(modname) or
aliases.aliases.get(modname.replace('.', '_')) or
modname)
try:
mod = __import__(modname, globals(), locals(), _import_tail)
except ImportError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment