[Python-Dev] Q: maybe rlcompleter shouldn't expose __builtins__?

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
2000年5月31日 16:05:41 +0200


from comp.lang.python:
> Thanks for the info. This choice of name is very confusing, to say =
the least.
> I used commandline completion with __buil TAB, and got __builtins__.

a simple way to avoid this problem is to change global_matches
in rlcompleter.py so that it doesn't return this name. I suggest
changing:
 if word[:n] =3D=3D text:
to
 if word[:n] =3D=3D text and work !=3D "__builtins__":
Comments?
(should we do a series of double-blind tests first? ;-)
</F>
 "People Propose, Science Studies, Technology Conforms"
 -- Don Norman

AltStyle によって変換されたページ (->オリジナル) /