``Completer.complete()`` method are now caught and ignored.
If called for a dotted name, it will try to evaluate anything without obvious
side-effects (functions will not be evaluated, but it can generate calls to
:meth:`__getattr__`) up to the last part, and find matches for the rest via the
- :func:`dir` function.
+ :func:`dir` function. Any exception raised during the evaluation of the
+ expression is caught, silenced and :const:`None` is returned.
if not m:
return []
expr, attr = m.group(1, 3)
- object = eval(expr, self.namespace)
+ try:
+ object = eval(expr, self.namespace)
+ except Exception:
+ return []
words = dir(object)
if hasattr(object,'__class__'):
words.append('__class__')
Library
-------
+- #2250: Exceptions raised during evaluation of names in rlcompleter's
+ ``Completer.complete()`` method are now caught and ignored.
+
- #2659: Added ``break_on_hyphens`` option to textwrap TextWrapper class.
- The mhlib module has been deprecated for removal in Python 3.0.