Created
December 2, 2020 12:22
-
-
Save geekyarthurs/50a7ebf5f9eca883160306e68de99e07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Callable | |
def decorator(func: Callable): | |
def inner_func(*args, **kwargs): | |
print(kwargs, func.__annotations__) | |
func(*args, **kwargs) | |
return inner_func | |
@decorator | |
def getAge(age: int, name: str): | |
print( f" {age} : {type(age)} , {name} : {type(name)} " ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment