Commit d8644075 authored by Georg Brandl's avatar Georg Brandl

Closes #14411: remove outdated comment in rlcompleter docstring.

parent 99e7d070
"""Word completion for GNU readline 2.0. """Word completion for GNU readline.
This requires the latest extension to the readline module. The completer The completer completes keywords, built-ins and globals in a selectable
completes keywords, built-ins and globals in a selectable namespace (which namespace (which defaults to __main__); when completing NAME.NAME..., it
defaults to __main__); when completing NAME.NAME..., it evaluates (!) the evaluates (!) the expression up to the last dot and completes its attributes.
expression up to the last dot and completes its attributes.
It's very cool to do "import sys" type "sys.", hit the It's very cool to do "import sys" type "sys.", hit the completion key (twice),
completion key (twice), and see the list of names defined by the and see the list of names defined by the sys module!
sys module!
Tip: to use the tab key as the completion key, call Tip: to use the tab key as the completion key, call
...@@ -15,21 +13,19 @@ Tip: to use the tab key as the completion key, call ...@@ -15,21 +13,19 @@ Tip: to use the tab key as the completion key, call
Notes: Notes:
- Exceptions raised by the completer function are *ignored* (and - Exceptions raised by the completer function are *ignored* (and generally cause
generally cause the completion to fail). This is a feature -- since the completion to fail). This is a feature -- since readline sets the tty
readline sets the tty device in raw (or cbreak) mode, printing a device in raw (or cbreak) mode, printing a traceback wouldn't work well
traceback wouldn't work well without some complicated hoopla to save, without some complicated hoopla to save, reset and restore the tty state.
reset and restore the tty state.
- The evaluation of the NAME.NAME... form may cause arbitrary - The evaluation of the NAME.NAME... form may cause arbitrary application
application defined code to be executed if an object with a defined code to be executed if an object with a __getattr__ hook is found.
__getattr__ hook is found. Since it is the responsibility of the Since it is the responsibility of the application (or the user) to enable this
application (or the user) to enable this feature, I consider this an feature, I consider this an acceptable risk. More complicated expressions
acceptable risk. More complicated expressions (e.g. function calls or (e.g. function calls or indexing operations) are *not* evaluated.
indexing operations) are *not* evaluated.
- When the original stdin is not a tty device, GNU readline is never - When the original stdin is not a tty device, GNU readline is never
used, and this module (and the readline module) are silently inactive. used, and this module (and the readline module) are silently inactive.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment