diff options
author | Fred Drake <fdrake@acm.org> | 2000-05-31 14:31:00 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-05-31 14:31:00 +0000 |
commit | 392d8dc818b11fea705e2836b0efff657b1ddd23 (patch) | |
tree | c80e4ca9d587b059dbac7adb1f874faa3287c0fc /Lib/rlcompleter.py | |
parent | bbb07f01a36886a9aa8db57fa969d721cf46df9f (diff) | |
download | cpython-392d8dc818b11fea705e2836b0efff657b1ddd23.tar.gz |
Do not expose __builtins__ name as a completion; this is an implementation
detail that confuses too many people. Based on discussion in python-dev.
Diffstat (limited to 'Lib/rlcompleter.py')
-rw-r--r-- | Lib/rlcompleter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index aa1dd0246b..7a248feff3 100644 --- a/Lib/rlcompleter.py +++ b/Lib/rlcompleter.py @@ -76,7 +76,7 @@ class Completer: __builtin__.__dict__.keys(), __main__.__dict__.keys()]: for word in list: - if word[:n] == text: + if word[:n] == text and word != "__builtins__": matches.append(word) return matches @@ -106,7 +106,7 @@ class Completer: matches = [] n = len(attr) for word in words: - if word[:n] == attr: + if word[:n] == attr and word != "__builtins__": matches.append("%s.%s" % (expr, word)) return matches |