sanic_template/utils/other.py
def count(items: list, clause: FunctionType) -> int:
    """
    Returns number of matching items.
    :param items:
    :param clause:
    :return:
    """
    k = 0
    if not items:
        return k
    for item in items:
        if clause(item):
            k += 1
    return k

    Returns number of matching items.
    :param items:
    :param clause:
    :return:
    
Returns number of matching items.
Returns number of matching items .
def count(items: list, clause: FunctionType) -> int:
    k = 0
    if not items:
        return k
    for item in items:
        if clause(item):
            k += 1
    return k
def count ( items : list , clause : FunctionType ) -> int : k = 0 if not items : return k for item in items : if clause ( item ) : k += 1 return k
Returns number of matching items.
Returns number of matching items .
"""
    Returns number of matching items.
    :param items:
    :param clause:
    :return:
    """
None
items
list
None
clause
FunctionType
None