summaryrefslogtreecommitdiff
path: root/Lib/rlcompleter.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-05-31 14:31:00 +0000
committerFred Drake <fdrake@acm.org>2000-05-31 14:31:00 +0000
commit46bd9a6191236c07401169ff407914aeacbddc98 (patch)
treed7a9da2d14122d48498cd9837fb9d46e1c2c49be /Lib/rlcompleter.py
parent5b8311e3c1e0103aaec24cbc693b634b84e4e0a4 (diff)
downloadcpython-git-46bd9a6191236c07401169ff407914aeacbddc98.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.py4
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