docstr: Compute matches when text contains a dot.
  
  Assuming the text is of the form NAME.NAME....[NAME], and is
  evaluatable in self.namespace or self.global_namespace, it will be
  evaluated and its attributes (as revealed by dir()) are used as
  possible completions.  (For class instances, class members are are
  also considered.)
  
  WARNING: this can still invoke arbitrary C code, if an object
  with a __getattr__ hook is evaluated.
docstr_tok: ["Compute","matches","when","text","contains","a","dot",".","Assuming","the","text","is","of","the","form","NAME.NAME","....","[","NAME","]",",","and","is","evaluatable","in","self.namespace","or","self.global_namespace",",","it","will","be","evaluated","and","its","attributes","(","as","revealed","by","dir","(",")",")","are","used","as","possible","completions",".","(","For","class","instances",",","class","members","are","are","also","considered",".",")","WARNING",":","this","can","still","invoke","arbitrary","C","code",",","if","an","object","with","a","__getattr__","hook","is","evaluated","."]
code: def attr_matches(self, text):
      """Compute matches when text contains a dot.
  
      Assuming the text is of the form NAME.NAME....[NAME], and is
      evaluatable in self.namespace or self.global_namespace, it will be
      evaluated and its attributes (as revealed by dir()) are used as
      possible completions.  (For class instances, class members are are
      also considered.)
  
      WARNING: this can still invoke arbitrary C code, if an object
      with a __getattr__ hook is evaluated.
  
      """
  
      # Another option, seems to work great. Catches things like ''.<tab>
      m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
  
      if m:
          expr, attr = m.group(1, 3)
      elif self.greedy:
          m2 = re.match(r"(.+)\.(\w*)$", self.line_buffer)
          if not m2:
              return []
          expr, attr = m2.group(1, 2)
      else:
          return []
  
      try:
          obj = eval(expr, self.namespace)
      except:
          try:
              obj = eval(expr, self.global_namespace)
          except:
              return []
  
      if self.limit_to__all__ and hasattr(obj, "__all__"):
          words = get__all__entries(obj)
      else:
          words = dir2(obj)
  
      try:
          words = generics.complete_object(obj, words)
      except TryNext:
          pass
      except Exception:
          # Silence errors from completion function
          # raise # dbg
          pass
      # Build match list to return
      n = len(attr)
      return ["%s.%s" % (expr, w) for w in words if w[:n] == attr]
  
imports: from __future__ import print_function
  import __main__
  import glob
  import inspect
  import itertools
  import keyword
  import os
  import re
  import sys
  import unicodedata
  import string
  import warnings
  from traitlets.config.configurable import Configurable
  from IPython.core.error import TryNext
  from IPython.core.inputsplitter import ESC_MAGIC
  from IPython.core.latex_symbols import latex_symbols, reverse_latex_symbol
  from IPython.utils import generics
  from IPython.utils.decorators import undoc
  from IPython.utils.dir2 import dir2, get_real_method
  from IPython.utils.process import arg_split
  from IPython.utils.py3compat import builtin_mod, string_types, PY3, cast_unicode_py2
  from traitlets import Bool, Enum, observe
label_desc: Use image node_id 4 for calling the Completer obj's underlying member method code with example usage: obj.attr_matches(text) and returns: unknown, list, list, list