diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 09:48:45 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 09:48:45 (GMT) |
commit | db5ebc7bc9ac64b7ca43c6387e75f4d8e8148188 (patch) | |
tree | 11ea2da677b1a5c6f8ce6f49e010cb8c7626312b /Lib/knee.py | |
parent | 51cc3bcd1c2c925825de8384a9cb70088d08d286 (diff) | |
download | cpython-db5ebc7bc9ac64b7ca43c6387e75f4d8e8148188.zip cpython-db5ebc7bc9ac64b7ca43c6387e75f4d8e8148188.tar.gz cpython-db5ebc7bc9ac64b7ca43c6387e75f4d8e8148188.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/knee.py')
-rw-r--r-- | Lib/knee.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/knee.py b/Lib/knee.py index 95c3c23..64764da 100644 --- a/Lib/knee.py +++ b/Lib/knee.py @@ -7,7 +7,7 @@ This code is intended to be read, not executed. However, it does work """ -import sys, imp, __builtin__, string +import sys, imp, __builtin__ # Replacement for __import__() @@ -30,7 +30,7 @@ def determine_parent(globals): assert globals is parent.__dict__ return parent if '.' in pname: - i = string.rfind(pname, '.') + i = pname.rfind('.') pname = pname[:i] parent = sys.modules[pname] assert parent.__name__ == pname @@ -39,7 +39,7 @@ def determine_parent(globals): def find_head_package(parent, name): if '.' in name: - i = string.find(name, '.') + i = name.find('.') head = name[:i] tail = name[i+1:] else: @@ -61,7 +61,7 @@ def find_head_package(parent, name): def load_tail(q, tail): m = q while tail: - i = string.find(tail, '.') + i = tail.find('.') if i < 0: i = len(tail) head, tail = tail[:i], tail[i+1:] mname = "%s.%s" % (m.__name__, head) @@ -111,7 +111,7 @@ def reload_hook(module): name = module.__name__ if '.' not in name: return import_module(name, name, None) - i = string.rfind(name, '.') + i = name.rfind('.') pname = name[:i] parent = sys.modules[pname] return import_module(name[i+1:], name, parent) |