Skip to content

Commit b8fb6c4

Browse files
authored
Create awaitme_onur_konuk.py
1 parent 133e6cb commit b8fb6c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week05/awaitme_onur_konuk.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(func):
4+
async def wrapper(*args, **kwargs):
5+
result = func(*args, **kwargs)
6+
if asyncio.iscoroutine(result):
7+
return await result
8+
return result
9+
return wrapper

0 commit comments

Comments
 (0)