class_docstr: Extension of the completer class with IPython-specific features
class_docstr_tok: ["Extension","of","the","completer","class","with","IPython-specific","features"]
docstr: Return the list of default arguments of obj if it is callable,
  or empty list otherwise.
docstr_tok: ["Return","the","list","of","default","arguments","of","obj","if","it","is","callable",",","or","empty","list","otherwise","."]
code: def _default_arguments(self, obj):
      """Return the list of default arguments of obj if it is callable,
      or empty list otherwise."""
      call_obj = obj
      ret = []
      if inspect.isbuiltin(obj):
          pass
      elif not (inspect.isfunction(obj) or inspect.ismethod(obj)):
          if inspect.isclass(obj):
              # for cython embededsignature=True the constructor docstring
              # belongs to the object itself not __init__
              ret += self._default_arguments_from_docstring(
                  getattr(obj, "__doc__", "")
              )
              # for classes, check for __init__,__new__
              call_obj = getattr(obj, "__init__", None) or getattr(
                  obj, "__new__", None
              )
          # for all others, check if they are __call__able
          elif hasattr(obj, "__call__"):
              call_obj = obj.__call__
      ret += self._default_arguments_from_docstring(
          getattr(call_obj, "__doc__", "")
      )
  
      if PY3:
          _keeps = (
              inspect.Parameter.KEYWORD_ONLY,
              inspect.Parameter.POSITIONAL_OR_KEYWORD,
          )
          signature = inspect.signature
      else:
          import IPython.utils.signatures
  
          _keeps = (
              IPython.utils.signatures.Parameter.KEYWORD_ONLY,
              IPython.utils.signatures.Parameter.POSITIONAL_OR_KEYWORD,
          )
          signature = IPython.utils.signatures.signature
  
      try:
          sig = signature(call_obj)
          ret.extend(
              k for k, v in sig.parameters.items() if v.kind in _keeps
          )
      except ValueError:
          pass
  
      return list(set(ret))
  
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 11 for calling the IPCompleter obj's underlying member method code with example usage: obj._default_arguments(obj) and returns: list