diff --git a/Week05/awaitme_kerem_ozakca.py b/Week05/awaitme_kerem_ozakca.py new file mode 100644 index 00000000..e9f74e68 --- /dev/null +++ b/Week05/awaitme_kerem_ozakca.py @@ -0,0 +1,9 @@ +import asyncio + +def convert_to_async_func(func): + async def wrapper(*args, **kwargs): + res = func(*args, **kwargs) + if asyncio.iscoroutine(res): + return await res + return res + return wrapper