(cls, parameters, elen)
Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
Check correct count for parameters of a generic cls ( internal helper ) . This gives a nice error message in case of count mismatch .
def _check_generic(cls, parameters, elen):
    """Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    """
    if not elen:
        raise TypeError(f"{cls} is not a generic class")
    alen = len(parameters)
    if alen != elen:
        raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments for {cls};"
                        f" actual {alen}, expected {elen}")
def _check_generic ( cls , parameters , elen ) : if not elen : raise TypeError ( f"{cls} is not a generic class" ) alen = len ( parameters ) if alen != elen : raise TypeError ( f"Too {'many' if alen > elen else 'few'} arguments for {cls};" f" actual {alen}, expected {elen}" )