(compilers: T.Iterable['Compiler'], src: 'FileOrString')
Given a set of compilers and a source, find the compiler for that source type.
Given a set of compilers and a source, find the compiler for that source type.
Given a set of compilers and a source find the compiler for that source type .
def get_compiler_for_source(compilers: T.Iterable['Compiler'], src: 'FileOrString') -> 'Compiler':
    """Given a set of compilers and a source, find the compiler for that source type."""
    for comp in compilers:
        if comp.can_compile(src):
            return comp
    raise MesonException(f'No specified compiler can handle file {src!s}')
def get_compiler_for_source ( compilers : T . Iterable [ 'Compiler' ] , src : 'FileOrString' ) -> 'Compiler' : for comp in compilers : if comp . can_compile ( src ) : return comp raise MesonException ( f'No specified compiler can handle file {src!s}' )