Skip to content

Commit 81967fe

Browse files
authored
Create awaitme_beyza_saridas.py
1 parent 21d3401 commit 81967fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Week05/awaitme_beyza_saridas.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import asyncio
2+
3+
def coroutine_decorator(func):
4+
async def _wrapper(*args, **kwargs):
5+
result = func(*args, **kwargs)
6+
7+
if asyncio.iscoroutine(result):
8+
return await result
9+
10+
return result

0 commit comments

Comments
 (0)