def source_location_to_tuple(locpb):
 if (locpb is None):
  return None
 if ((not locpb.file()) and (not locpb.line()) and (not locpb.function_name())):
  return None
 return (locpb.file(), locpb.line(), locpb.function_name())

def source_location_to_tuple ( locpb ) : if ( locpb is None ) : return None if ( ( not locpb . file ( ) ) and ( not locpb . line ( ) ) and ( not locpb . function_name ( ) ) ) : return None return ( locpb . file ( ) , locpb . line ( ) , locpb . function_name ( ) )
converts a sourcelocation proto into a tuple of primitive types .