mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
#2220: handle matching failure more gracefully.
This commit is contained in:
parent
a7bd27f0a8
commit
4286138e7b
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ class Completer:
|
||||||
import re
|
import re
|
||||||
m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
|
m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
|
||||||
if not m:
|
if not m:
|
||||||
return
|
return []
|
||||||
expr, attr = m.group(1, 3)
|
expr, attr = m.group(1, 3)
|
||||||
object = eval(expr, self.namespace)
|
object = eval(expr, self.namespace)
|
||||||
words = dir(object)
|
words = dir(object)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue