diff --git a/Week05/awaitme_cagan_atan.py b/Week05/awaitme_cagan_atan.py new file mode 100644 index 00000000..d5e3a902 --- /dev/null +++ b/Week05/awaitme_cagan_atan.py @@ -0,0 +1,11 @@ +import asyncio + +def awaitme(func): + + async def _wrapper(*args,**kwargs): + result = func(*args,**kwargs) + if asyncio.iscoroutine(result): + return await result + return result + + return _wrapper