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