def getConstructor(object):
 try:
  return object.__init__.im_func
 except AttributeError:
  for base in object.__bases__:
   constructor = getConstructor(base)
   if (constructor is not None):
    return constructor
 return None

def getConstructor ( object ) : try : return object . __init__ . im_func except AttributeError : for base in object . __bases__ : constructor = getConstructor ( base ) if ( constructor is not None ) : return constructor return None
return constructor for class object .