diff --git a/Week05/awaitme_soner_basak.py b/Week05/awaitme_soner_basak.py new file mode 100644 index 00000000..e6975351 --- /dev/null +++ b/Week05/awaitme_soner_basak.py @@ -0,0 +1,9 @@ +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