Skip to content

Commit 7da307b

Browse files
Create awaitme_kerem_kurtuldu.py
1 parent fea20f7 commit 7da307b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week05/awaitme_kerem_kurtuldu.py

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

0 commit comments

Comments
 (0)