]> granicus.if.org Git - python/commitdiff
Removed some unneeded imports, moved others around.
authorGuido van Rossum <guido@python.org>
Wed, 22 Oct 1997 20:52:53 +0000 (20:52 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 22 Oct 1997 20:52:53 +0000 (20:52 +0000)
Lib/rlcompleter.py

index 285faedb72b25fc09022f8835e3ef5bee4d1567a..4deb0bceb43b3b5fcac43571c969651e1e713a42 100644 (file)
@@ -41,12 +41,8 @@ used, and this module (and the readline module) are silently inactive.
 """
 
 import readline
-import keyword
 import __builtin__
 import __main__
-import string
-import re
-import traceback
 
 class Completer:
 
@@ -71,6 +67,7 @@ class Completer:
        currently defines in __main__ that match.
 
        """
+       import keyword
        matches = []
        n = len(text)
        for list in [keyword.kwlist,
@@ -93,6 +90,7 @@ class Completer:
        with a __getattr__ hook is evaluated.
 
        """
+       import re
        m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
        if not m:
            return