summaryrefslogtreecommitdiff
path: root/Lib/rlcompleter.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-11-09 16:36:45 +0000
committerGuido van Rossum <guido@python.org>1999-11-09 16:36:45 +0000
commit768d2271a8e15566c8421dabe845446a9221f031 (patch)
treec18815be3d88df61982ff28623a674d3db4116b5 /Lib/rlcompleter.py
parent09cbb019895047eaf159f40429dd8530601c1d01 (diff)
downloadcpython-git-768d2271a8e15566c8421dabe845446a9221f031.tar.gz
Oops. Remove some garbage from the doc string that was accidentally
checked in due to a patching mishap. Reported by Detlef Lannert; thanks!
Diffstat (limited to 'Lib/rlcompleter.py')
-rw-r--r--Lib/rlcompleter.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
index 96abad0283..aa1dd0246b 100644
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -1,24 +1,12 @@
"""Word completion for GNU readline 2.0.
This requires the latest extension to the readline module (the
- object=eval(expr, __main__.__dict__)
- words = dir(object)
- if hasattr(object,'__class__'):
- words.append('__class__')
- words=words+get_class_members(object.__class__)
completes keywords, built-ins and globals in __main__; when completing
NAME.NAME..., it evaluates (!) the expression up to the last dot and
completes its attributes.
It's very cool to do "import string" type "string.", hit the
completion key (twice), and see the list of names defined by the
-
-def get_class_members(klass):
- ret=dir(klass)
- if hasattr(klass,'__bases__'):
- for base in klass.__bases__:
- ret=ret + get_class_members(base)
- return ret
string module!
Tip: to use the tab key as the completion key, call