def getBaseObject(object):
 if inspect.isbuiltin(object):
  dropSelf = 0
 elif inspect.ismethod(object):
  try:
   if (object.im_self is None):
    dropSelf = 0
   else:
    dropSelf = 1
   object = object.im_func
  except AttributeError:
   dropSelf = 0
 elif inspect.isclass(object):
  constructor = getConstructor(object)
  if (constructor is not None):
   object = constructor
   dropSelf = 1
  else:
   dropSelf = 0
 elif callable(object):
  try:
   object = object.__call__.im_func
   dropSelf = 1
  except AttributeError:
   dropSelf = 0
 else:
  dropSelf = 0
 return (object, dropSelf)

def getBaseObject ( object ) : if inspect . isbuiltin ( object ) : dropSelf = 0 elif inspect . ismethod ( object ) : try : if ( object . im_self is None ) : dropSelf = 0 else : dropSelf = 1 object = object . im_func except AttributeError : dropSelf = 0 elif inspect . isclass ( object ) : constructor = getConstructor ( object ) if ( constructor is not None ) : object = constructor dropSelf = 1 else : dropSelf = 0 elif callable ( object ) : try : object = object . __call__ . im_func dropSelf = 1 except AttributeError : dropSelf = 0 else : dropSelf = 0 return ( object , dropSelf )
return base object and dropself indicator for an object .