Commit Graph

18 Commits

Author SHA1 Message Date
Facundo Batista 66c527755d Issue #449227: Now with the rlcompleter module, callable objects are
added a '(' when completed.
2008-07-02 16:52:55 +00:00
Georg Brandl 627a666db0 - #2250: Exceptions raised during evaluation of names in rlcompleter's
``Completer.complete()`` method are now caught and ignored.
2008-05-11 21:03:42 +00:00
Georg Brandl 4286138e7b #2220: handle matching failure more gracefully. 2008-03-06 07:43:02 +00:00
Georg Brandl 3583cff5a9 Patch #1472854: make the rlcompleter.Completer class usable on non-
UNIX platforms.
2006-04-30 18:14:54 +00:00
Walter Dörwald f0dfc7ac5c Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
2003-10-20 14:01:56 +00:00
Walter Dörwald 65230a2de7 Remove uses of the string and types modules:
x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)

Do not mention the string module in the rlcompleter docstring.

This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)
2002-06-03 15:58:32 +00:00
Raymond Hettinger e0d4972acc Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
Tim Peters 863ac44b74 Whitespace normalization. 2002-04-16 01:38:40 +00:00
Neil Schemenauer dbab3e3178 Add namespace selection for rlcompleter. Closes SF patch 490026. 2002-03-23 23:44:51 +00:00
Skip Montanaro 0de65807e6 bunch more __all__ lists
also modified check_all function to suppress all warnings since they aren't
relevant to what this test is doing (allows quiet checking of regsub, for
instance)
2001-02-15 22:15:14 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Fred Drake 46bd9a6191 Do not expose __builtins__ name as a completion; this is an implementation
detail that confuses too many people.  Based on discussion in python-dev.
2000-05-31 14:31:00 +00:00
Guido van Rossum 768d2271a8 Oops. Remove some garbage from the doc string that was accidentally
checked in due to a patching mishap.  Reported by Detlef Lannert;
thanks!
1999-11-09 16:36:45 +00:00
Guido van Rossum 4e20de59dd Patch by Michael Hudson: when the object of attribute expansion is a
class instance, include the class attributes in the list of possible
expansions.
1999-10-26 13:09:08 +00:00
Guido van Rossum d458faadc3 In completer(), return None instead of raising an IndexError when
there are no more completions left.  (This for compatibility with
Donald Beaudry's code.)
1998-06-12 19:42:14 +00:00
Guido van Rossum 45e2fbc2e7 Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
Guido van Rossum 12f86ade21 Removed some unneeded imports, moved others around. 1997-10-22 20:52:53 +00:00
Guido van Rossum 2781fbe46c Word completion for the new readline.set_completer() function.
When completing a simple identifier, it 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
string module!

Tip: to use the tab key as the completion key, call

    readline.parse_and_bind("tab: complete")
1997-09-26 22:04:56 +00:00