We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80e7706 commit 3ab27ebCopy full SHA for 3ab27eb
bpython/autocomplete.py
@@ -455,12 +455,17 @@ def safe_eval(expr, namespace):
455
raise EvaluationError
456
457
458
-attr_matches_re = re.compile(r"(\w+(\.\w+)*)\.(\w*)")
+attr_matches_re = None
459
+
460
461
def attr_matches(text, namespace):
462
"""Taken from rlcompleter.py and bent to my will.
463
"""
464
465
+ global attr_matches_re
466
+ if attr_matches_re is None:
467
+ attr_matches_re = re.compile(r"(\w+(\.\w+)*)\.(\w*)")
468
469
# Gna, Py 2.6's rlcompleter searches for __call__ inside the
470
# instance instead of the type, so we monkeypatch to prevent
471
# side-effects (__getattr__/__getattribute__)
0 commit comments