third_party/blink/renderer/bindings/scripts/web_idl/function_like.py
def effective_overload_set(self, argument_count=None):
        """
        Returns the effective overload set.
        https://webidl.spec.whatwg.org/#compute-the-effective-overload-set
        """
        assert argument_count is None or isinstance(argument_count, int)

        N = argument_count
        S = []
        F = self

        maxarg = max(map(lambda X: len(X.arguments), F))
        if N is None:
            arg_sizes = [len(X.arguments) for X in F if not X.is_variadic]
            N = 1 + (max(arg_sizes) if arg_sizes else 0)

        for X in F:
            n = len(X.arguments)

            S.append(
                OverloadGroup.EffectiveOverloadItem(
                    X, list(map(lambda arg: arg.idl_type, X.arguments)),
                    list(map(lambda arg: arg.optionality, X.arguments))))

            if X.is_variadic:
                for i in range(n, max(maxarg, N)):
                    t = list(map(lambda arg: arg.idl_type, X.arguments))
                    o = list(map(lambda arg: arg.optionality, X.arguments))
                    for _ in range(n, i + 1):
                        t.append(X.arguments[-1].idl_type)
                        o.append(X.arguments[-1].optionality)
                    S.append(OverloadGroup.EffectiveOverloadItem(X, t, o))

            t = list(map(lambda arg: arg.idl_type, X.arguments))
            o = list(map(lambda arg: arg.optionality, X.arguments))
            for i in range(n - 1, -1, -1):
                if X.arguments[i].optionality == IdlType.Optionality.REQUIRED:
                    break
                S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i]))

        return S

        Returns the effective overload set.
        https://webidl.spec.whatwg.org/#compute-the-effective-overload-set
        
Returns the effective overload set.
Returns the effective overload set .
def effective_overload_set(self, argument_count=None):
        assert argument_count is None or isinstance(argument_count, int)
        N = argument_count
        S = []
        F = self
        maxarg = max(map(lambda X: len(X.arguments), F))
        if N is None:
            arg_sizes = [len(X.arguments) for X in F if not X.is_variadic]
            N = 1 + (max(arg_sizes) if arg_sizes else 0)
        for X in F:
            n = len(X.arguments)
            S.append(
                OverloadGroup.EffectiveOverloadItem(
                    X, list(map(lambda arg: arg.idl_type, X.arguments)),
                    list(map(lambda arg: arg.optionality, X.arguments))))
            if X.is_variadic:
                for i in range(n, max(maxarg, N)):
                    t = list(map(lambda arg: arg.idl_type, X.arguments))
                    o = list(map(lambda arg: arg.optionality, X.arguments))
                    for _ in range(n, i + 1):
                        t.append(X.arguments[-1].idl_type)
                        o.append(X.arguments[-1].optionality)
                    S.append(OverloadGroup.EffectiveOverloadItem(X, t, o))
            t = list(map(lambda arg: arg.idl_type, X.arguments))
            o = list(map(lambda arg: arg.optionality, X.arguments))
            for i in range(n - 1, -1, -1):
                if X.arguments[i].optionality == IdlType.Optionality.REQUIRED:
                    break
                S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i]))
        return S
def effective_overload_set ( self , argument_count = None ) : assert argument_count is None or isinstance ( argument_count , int ) N = argument_count S = [ ] F = self maxarg = max ( map ( lambda X : len ( X . arguments ) , F ) ) if N is None : arg_sizes = [ len ( X . arguments ) for X in F if not X . is_variadic ] N = 1 + ( max ( arg_sizes ) if arg_sizes else 0 ) for X in F : n = len ( X . arguments ) S . append ( OverloadGroup . EffectiveOverloadItem ( X , list ( map ( lambda arg : arg . idl_type , X . arguments ) ) , list ( map ( lambda arg : arg . optionality , X . arguments ) ) ) ) if X . is_variadic : for i in range ( n , max ( maxarg , N ) ) : t = list ( map ( lambda arg : arg . idl_type , X . arguments ) ) o = list ( map ( lambda arg : arg . optionality , X . arguments ) ) for _ in range ( n , i + 1 ) : t . append ( X . arguments [ - 1 ] . idl_type ) o . append ( X . arguments [ - 1 ] . optionality ) S . append ( OverloadGroup . EffectiveOverloadItem ( X , t , o ) ) t = list ( map ( lambda arg : arg . idl_type , X . arguments ) ) o = list ( map ( lambda arg : arg . optionality , X . arguments ) ) for i in range ( n - 1 , - 1 , - 1 ) : if X . arguments [ i ] . optionality == IdlType . Optionality . REQUIRED : break S . append ( OverloadGroup . EffectiveOverloadItem ( X , t [ : i ] , o [ : i ] ) ) return S
Returns the effective overload set.
Returns the effective overload set .
"""
        Returns the effective overload set.
        https://webidl.spec.whatwg.org/#compute-the-effective-overload-set
        """
self
argument_count