mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Do not expose __builtins__ name as a completion; this is an implementation
detail that confuses too many people. Based on discussion in python-dev.
This commit is contained in:
parent
5b8311e3c1
commit
46bd9a6191
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ def global_matches(self, text):
|
|||
__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 @@ def attr_matches(self, text):
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue