[Python-checkins] CVS: python/dist/src/Lib rlcompleter.py,1.6,1.7

Fred L. Drake python-dev@python.org
Wed, 31 May 2000 07:31:03 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12851/Lib

Modified Files:
	rlcompleter.py 
Log Message:

Do not expose __builtins__ name as a completion; this is an implementation
detail that confuses too many people.  Based on discussion in python-dev.


Index: rlcompleter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rlcompleter.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** rlcompleter.py	1999/11/09 16:36:45	1.6
--- rlcompleter.py	2000/05/31 14:31:00	1.7
***************
*** 77,81 ****
                       __main__.__dict__.keys()]:
              for word in list:
!                 if word[:n] == text:
                      matches.append(word)
          return matches
--- 77,81 ----
                       __main__.__dict__.keys()]:
              for word in list:
!                 if word[:n] == text and word != "__builtins__":
                      matches.append(word)
          return matches
***************
*** 107,111 ****
          n = len(attr)
          for word in words:
!             if word[:n] == attr:
                  matches.append("%s.%s" % (expr, word))
          return matches
--- 107,111 ----
          n = len(attr)
          for word in words:
!             if word[:n] == attr and word != "__builtins__":
                  matches.append("%s.%s" % (expr, word))
          return matches