f | def DefArgs(*decor_args): | f | def DefArgs(*decor_args): |
n | nvodhowhfodbovbdsohoeshogbcoxbvosdhofbdbvkcxbkvnosdhgherohgkbcvkjxbncgvigdrbfgnvdsobvcxoicbgoerhgobdfovboasnfosbdofgb = len(decor_args) | n | k = len(decor_args) |
| | | |
| def decorator(fun): | | def decorator(fun): |
n | cznxmvbkasgi = fun.__code__.co_argcount | n | n = fun.__code__.co_argcount |
| if nvodhowhfodbovbdsohoeshogbcoxbvosdhofbdbvkcxbkvnosdhgherohgkbcvkjxbncgvigdrbfgnvdsobvcxoicbgoerhgobdfovboasnfosbdofgb < cznxmvbkasgi: | | if k < n: |
| raise TypeError() | | raise TypeError() |
| | | |
n | def wrapper(*args): | n | def wraper(*args): |
| vnosndvbondfobodhgoxncvkcnvjncxjnweopjgpoierhgnbncvbnodjgoherohdgbvcbsdohfowbreg = len(args) | | m = len(args) |
| if vnosndvbondfobodhgoxncvkcnvjncxjnweopjgpoierhgnbncvbnodjgoherohdgbvcbsdohfowbreg + nvodhowhfodbovbdsohoeshogbcoxbvosdhofbdbvkcxbkvnosdhgherohgkbcvkjxbncgvigdrbfgnvdsobvcxoicbgoerhgobdfovboasnfosbdofgb < cznxmvbkasgi or vnosndvbondfobodhgoxncvkcnvjncxjnweopjgpoierhgnbncvbnodjgoherohdgbvcbsdohfowbreg > cznxmvbkasgi: | | if m + k < n or m > n: |
| raise TypeError() | | raise TypeError() |
n | for vcnxmbnvksdhgoerhogrtbobhlxvcowehtoghr, xnvlsdrgprtjhotyjytpjptyjwbefwufvvcbxvw in zip(args, decor_args): | n | for x, y in zip(args, decor_args): |
| if not issubclass(type(vcnxmbnvksdhgoerhogrtbobhlxvcowehtoghr), type(xnvlsdrgprtjhotyjytpjptyjwbefwufvvcbxvw)): | | if not issubclass(type(x), type(y)): |
| raise TypeError() | | raise TypeError() |
t | return fun(*args, *decor_args[vnosndvbondfobodhgoxncvkcnvjncxjnweopjgpoierhgnbncvbnodjgoherohdgbvcbsdohfowbreg:cznxmvbkasgi]) | t | return fun(*args, *decor_args[m:n]) |
| return wrapper | | return wraper |
| return decorator | | return decorator |