Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d864407

Browse files
committed
Closes #14411: remove outdated comment in rlcompleter docstring.
1 parent 99e7d07 commit d864407

1 file changed

Lines changed: 16 additions & 20 deletions

File tree

Lib/rlcompleter.py

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1-
"""Word completion for GNU readline 2.0.
1+
"""Word completion for GNU readline.
22
3-
This requires the latest extension to the readline module. The completer
4-
completes keywords, built-ins and globals in a selectable namespace (which
5-
defaults to __main__); when completing NAME.NAME..., it evaluates (!) the
6-
expression up to the last dot and completes its attributes.
3+
The completer completes keywords, built-ins and globals in a selectable
4+
namespace (which defaults to __main__); when completing NAME.NAME..., it
5+
evaluates (!) the expression up to the last dot and completes its attributes.
76
8-
It's very cool to do "import sys" type "sys.", hit the
9-
completion key (twice), and see the list of names defined by the
10-
sys module!
7+
It's very cool to do "import sys" type "sys.", hit the completion key (twice),
8+
and see the list of names defined by the sys module!
119
1210
Tip: to use the tab key as the completion key, call
1311
1412
readline.parse_and_bind("tab: complete")
1513
1614
Notes:
1715
18-
- Exceptions raised by the completer function are *ignored* (and
19-
generally cause the completion to fail). This is a feature -- since
20-
readline sets the tty device in raw (or cbreak) mode, printing a
21-
traceback wouldn't work well without some complicated hoopla to save,
22-
reset and restore the tty state.
16+
- Exceptions raised by the completer function are *ignored* (and generally cause
17+
the completion to fail). This is a feature -- since readline sets the tty
18+
device in raw (or cbreak) mode, printing a traceback wouldn't work well
19+
without some complicated hoopla to save, reset and restore the tty state.
2320
24-
- The evaluation of the NAME.NAME... form may cause arbitrary
25-
application defined code to be executed if an object with a
26-
__getattr__ hook is found. Since it is the responsibility of the
27-
application (or the user) to enable this feature, I consider this an
28-
acceptable risk. More complicated expressions (e.g. function calls or
29-
indexing operations) are *not* evaluated.
21+
- The evaluation of the NAME.NAME... form may cause arbitrary application
22+
defined code to be executed if an object with a __getattr__ hook is found.
23+
Since it is the responsibility of the application (or the user) to enable this
24+
feature, I consider this an acceptable risk. More complicated expressions
25+
(e.g. function calls or indexing operations) are *not* evaluated.
3026
3127
- When the original stdin is not a tty device, GNU readline is never
32-
used, and this module (and the readline module) are silently inactive.
28+
used, and this module (and the readline module) are silently inactive.
3329
3430
"""
3531

0 commit comments

Comments
 (0)