From: Georg Brandl Date: Thu, 6 Mar 2008 07:43:02 +0000 (+0000) Subject: #2220: handle matching failure more gracefully. X-Git-Tag: v2.6a2~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4286138e7b06e5dd2cb1e8ebf12f768d018be3c2;p=python #2220: handle matching failure more gracefully. --- diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index dab0cb9eaa..a2d5fe6a8f 100644 --- a/Lib/rlcompleter.py +++ b/Lib/rlcompleter.py @@ -125,7 +125,7 @@ class Completer: import re m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) if not m: - return + return [] expr, attr = m.group(1, 3) object = eval(expr, self.namespace) words = dir(object)