Skip to content

Instantly share code, notes, and snippets.

@geekyarthurs
Created December 2, 2020 12:22
Show Gist options
  • Save geekyarthurs/50a7ebf5f9eca883160306e68de99e07 to your computer and use it in GitHub Desktop.
Save geekyarthurs/50a7ebf5f9eca883160306e68de99e07 to your computer and use it in GitHub Desktop.
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