def class_result(classname):
 def wrap_errcheck(result, func, arguments):
  if (result is None):
   return None
  return classname(result)
 return wrap_errcheck

def class_result ( classname ) : def wrap_errcheck ( result , func , arguments ) : if ( result is None ) : return None return classname ( result ) return wrap_errcheck
errcheck function .