We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb499b8 commit ad584cbCopy full SHA for ad584cb
bpython/autocomplete.py
@@ -297,14 +297,16 @@ def safe_eval(expr, namespace):
297
raise EvaluationError
298
299
300
+attr_matches_re = re.compile(r"(\w+(\.\w+)*)\.(\w*)")
301
+
302
def attr_matches(text, namespace, autocomplete_mode):
303
"""Taken from rlcompleter.py and bent to my will.
304
"""
305
306
# Gna, Py 2.6's rlcompleter searches for __call__ inside the
307
# instance instead of the type, so we monkeypatch to prevent
308
# side-effects (__getattr__/__getattribute__)
- m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
309
+ m = attr_matches_re.match(text)
310
if not m:
311
return []
312
0 commit comments