Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d8644075
Commit
d8644075
authored
Mar 27, 2012
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #14411: remove outdated comment in rlcompleter docstring.
parent
99e7d070
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
Lib/rlcompleter.py
Lib/rlcompleter.py
+16
-20
No files found.
Lib/rlcompleter.py
View file @
d8644075
"""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.
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment