mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
Bug #2220: handle rlcompleter attribute match failure more gracefully.
(backport from r61275)
This commit is contained in:
parent
0e30555748
commit
ab61dce0e1
2 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue