diff --git a/Week05/awaitme_onur_konuk.py b/Week05/awaitme_onur_konuk.py new file mode 100644 index 00000000..ad22e180 --- /dev/null +++ b/Week05/awaitme_onur_konuk.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