Fix for SF 686380, from SF patch 686771 by Ping. (errors trying to

get help on os attributes)
This commit is contained in:
Guido van Rossum 2003-02-16 01:12:32 +00:00
parent 0ae4c4a823
commit 97dede0202

View File

@ -1303,7 +1303,7 @@ def describe(thing):
def locate(path, forceload=0):
"""Locate an object by name or dotted path, importing as necessary."""
parts = split(path, '.')
parts = [part for part in split(path, '.') if part]
module, n = None, 0
while n < len(parts):
nextmodule = safeimport(join(parts[:n+1], '.'), forceload)